From: havoc Date: Sun, 9 May 2021 20:16:20 +0000 (+0000) Subject: Fix some warnings in MSVC++2019. Add SDL2-nuget package as a dependency of the MSVC... X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=e22be35609a3da42c7546adbc4ea943fb8847d95 Fix some warnings in MSVC++2019. Add SDL2-nuget package as a dependency of the MSVC++2019 project. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13132 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_parse.c b/cl_parse.c index 39d1bbe4..4fc4a976 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -3293,7 +3293,7 @@ static void CL_NetworkTimeReceived(double newtime) } else if (cls.protocol != PROTOCOL_QUAKEWORLD) { - double timehigh; + double timehigh = 0; // hush compiler warning cl.mtime[1] = max(cl.mtime[1], cl.mtime[0] - 0.1); if (developer_extra.integer && vid_activewindow) diff --git a/darkplaces-sdl2-vs2019.vcxproj b/darkplaces-sdl2-vs2019.vcxproj index a44a9231..c24c3c28 100644 --- a/darkplaces-sdl2-vs2019.vcxproj +++ b/darkplaces-sdl2-vs2019.vcxproj @@ -432,7 +432,19 @@ + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/fs.c b/fs.c index c4ecfe28..2efb08ec 100644 --- a/fs.c +++ b/fs.c @@ -2520,13 +2520,9 @@ with portable ones in-place, etc) */ void FS_SanitizePath(char *path) { - int i, size; - - for(i = 0, size = strlen(path); i < size; i++) - { - if(path[i] == '\\') - path[i] = '/'; - } + for (; *path; path++) + if (*path == '\\') + *path = '/'; } /* diff --git a/prvm_cmds.c b/prvm_cmds.c index 8658085e..68e17589 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -61,7 +61,7 @@ void VM_CheckEmptyString(prvm_prog_t *prog, const char *s) qbool PRVM_ConsoleCommand (prvm_prog_t *prog, const char *text, int *func, qbool preserve_self, int curself, double ptime, qbool prog_loaded, const char *error_message) { int restorevm_tempstringsbuf_cursize; - int save_self; + int save_self = 0; // hush compiler warning qbool r = false; if(!prog_loaded)