dynamorio icon indicating copy to clipboard operation
dynamorio copied to clipboard

many warnings building with VS2015

Open derekbruening opened this issue 10 years ago • 3 comments

Xref #1902: DR and DRMF samples fail to link with VS2015

There are many warnings building DR with VS2015:

FAILED: F:\PROGRA~3\MICROS~1\VC\bin\cl.exe   /nologo -DHOT_PATCHING_INTERFACE -DNOT_DYNAMORIO_CORE_PROPER -DUNICODE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\derek\dr\git\src\core\win32 -I. -ID:\derek\dr\git\src\core\arch\x86 -ID:\derek\dr\git\src\core\arch -ID:\derek\dr\git\src\core\lib -ID:\derek\dr\git\src\core /nologo /MP /GF /FS /GS- /MT  /Zi /Od /W4 /WX     /wd4996 /wd4047 /wd4024 /wd4133 /wd4127 /wd4100 /wd4292 /wd4127 /wd4100 /Zi -DNOT_DYNAMORIO_CORE /showIncludes /Folibutil\CMakeFiles\policy_static.dir\__\core\win32\ntdll_shared.c.obj /Fdlibutil\CMakeFiles\policy_static.dir\ /FS -c D:\derek\dr\git\src\core\win32\ntdll_shared.c
C:\PROGRA~2\WI3CF2~1\10\include\10.0.10240.0\ucrt\stdio.h(1925): error C2220: warning treated as error - no 'object' file generated
C:\PROGRA~2\WI3CF2~1\10\include\10.0.10240.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition
D:\derek\dr\git\src\core\win32\ntdll_shared.c(56): note: see previous definition of 'snprintf'
C:\PROGRA~2\WI3CF2~1\10\include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error:  Macro definition of snprintf conflicts with Standard Library function declaration
   Creating library suite\tests\bin\client.modules.appdll.lib and object suite\tests\bin\client.modules.appdll.exp
FAILED: F:\PROGRA~3\MICROS~1\VC\bin\cl.exe   /nologo -DHOT_PATCHING_INTERFACE -DNOT_DYNAMORIO_CORE_PROPER -DUNICODE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\derek\dr\git\src\core\win32 -I. -ID:\derek\dr\git\src\core\arch\x86 -ID:\derek\dr\git\src\core\arch -ID:\derek\dr\git\src\core\lib -ID:\derek\dr\git\src\core /nologo /MP /GF /FS /GS- /MT  /Zi /Od /W4 /WX     /wd4996 /wd4047 /wd4024 /wd4133 /wd4127 /wd4100 /wd4292 /wd4127 /wd4100 /Zi -DNOT_DYNAMORIO_CORE /showIncludes /Folibutil\CMakeFiles\policy_static.dir\services.c.obj /Fdlibutil\CMakeFiles\policy_static.dir\ /FS -c D:\derek\dr\git\src\libutil\services.c
D:\derek\dr\git\src\libutil\services.c(422): error C2220: warning treated as error - no 'object' file generated
D:\derek\dr\git\src\libutil\services.c(422): warning C4459: declaration of 'scmdb' hides global declaration
D:\derek\dr\git\src\libutil\services.c(422): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
D:\derek\dr\git\src\libutil\services.c(58): note: see declaration of 'scmdb'
FAILED: F:\PROGRA~3\MICROS~1\VC\bin\cl.exe   /nologo -DHOT_PATCHING_INTERFACE -DNOT_DYNAMORIO_CORE_PROPER -DUNICODE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\derek\dr\git\src\core\win32 -I. -ID:\derek\dr\git\src\core\arch\x86 -ID:\derek\dr\git\src\core\arch -ID:\derek\dr\git\src\core\lib -ID:\derek\dr\git\src\core /nologo /MP /GF /FS /GS- /MT  /Zi /Od /W4 /WX     /wd4996 /wd4047 /wd4024 /wd4133 /wd4127 /wd4100 /wd4292 /wd4127 /wd4100 /Zi -DRC_IS_DUMPEVTS -DNOT_DYNAMORIO_CORE /showIncludes /Folibutil\CMakeFiles\dumpevts.dir\dumpevts.c.obj /Fdlibutil\CMakeFiles\dumpevts.dir\ /FS -c D:\derek\dr\git\src\libutil\dumpevts.c
D:\derek\dr\git\src\libutil\dumpevts.c(93): error C2220: warning treated as error - no 'object' file generated
D:\derek\dr\git\src\libutil\dumpevts.c(93): warning C4456: declaration of 'res' hides previous local declaration
D:\derek\dr\git\src\libutil\dumpevts.c(93): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
D:\derek\dr\git\src\libutil\dumpevts.c(89): note: see declaration of 'res'
   Creating library suite\tests\bin\client.inline.lib and object suite\tests\bin\client.inline.exp
FAILED: F:\PROGRA~3\MICROS~1\VC\bin\cl.exe   /nologo -DHOT_PATCHING_INTERFACE -DNOT_DYNAMORIO_CORE_PROPER -DUNICODE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\derek\dr\git\src\core\win32 -I. -ID:\derek\dr\git\src\core\arch\x86 -ID:\derek\dr\git\src\core\arch -ID:\derek\dr\git\src\core\lib -ID:\derek\dr\git\src\core /nologo /MP /GF /FS /GS- /MT  /Zi /Od /W4 /WX     /wd4996 /wd4047 /wd4024 /wd4133 /wd4127 /wd4100 /wd4292 /wd4127 /wd4100 /Zi -DNOT_DYNAMORIO_CORE /showIncludes /Folibutil\CMakeFiles\policy_static.dir\processes.c.obj /Fdlibutil\CMakeFiles\policy_static.dir\ /FS -c D:\derek\dr\git\src\libutil\processes.c
D:\derek\dr\git\src\libutil\processes.c(156): error C2220: warning treated as error - no 'object' file generated
D:\derek\dr\git\src\libutil\processes.c(156): warning C4477: 'printf' : format string '%08x' requires an argument of type 'unsigned int', but variadic argument 1 has type 'hotp_policy_status_table_t **'
D:\derek\dr\git\src\libutil\processes.c(156): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
D:\derek\dr\git\src\libutil\processes.c(365): warning C4477: 'printf' : format string '%08x' requires an argument of type 'unsigned int', but variadic argument 4 has type 'ConfigGroup *'
D:\derek\dr\git\src\libutil\processes.c(365): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
D:\derek\dr\git\src\libutil\processes.c(365): warning C4477: 'printf' : format string '%08x' requires an argument of type 'unsigned int', but variadic argument 5 has type 'ConfigGroup *'
D:\derek\dr\git\src\libutil\processes.c(365): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
FAILED: F:\PROGRA~3\MICROS~1\VC\bin\cl.exe   /nologo -DHOT_PATCHING_INTERFACE -DNOT_DYNAMORIO_CORE_PROPER -DUNICODE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\derek\dr\git\src\core\win32 -I. -ID:\derek\dr\git\src\core\arch\x86 -ID:\derek\dr\git\src\core\arch -ID:\derek\dr\git\src\core\lib -ID:\derek\dr\git\src\core /nologo /MP /GF /FS /GS- /MT  /Zi /Od /W4 /WX     /wd4996 /wd4047 /wd4024 /wd4133 /wd4127 /wd4100 /wd4292 /wd4127 /wd4100 /Zi -DNOT_DYNAMORIO_CORE /showIncludes /Folibutil\CMakeFiles\policy_static.dir\utils.c.obj /Fdlibutil\CMakeFiles\policy_static.dir\ /FS -c D:\derek\dr\git\src\libutil\utils.c
D:\derek\dr\git\src\libutil\utils.c(396): error C2220: warning treated as error - no 'object' file generated
D:\derek\dr\git\src\libutil\utils.c(396): warning C4477: '_snwprintf' : format string '%S' requires an argument of type 'char *', but variadic argument 1 has type 'const TCHAR *'
D:\derek\dr\git\src\libutil\utils.c(396): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
D:\derek\dr\git\src\libutil\utils.c(396): note: consider using '%lS' in the format string
D:\derek\dr\git\src\libutil\utils.c(396): note: consider using '%llS' in the format string
D:\derek\dr\git\src\libutil\utils.c(396): note: consider using '%LS' in the format string
D:\derek\dr\git\src\libutil\utils.c(396): note: consider using '%wS' in the format string
D:\derek\dr\git\src\libutil\utils.c(396): warning C4477: '_snwprintf' : format string '%S' requires an argument of type 'char *', but variadic argument 2 has type 'unsigned short *'
D:\derek\dr\git\src\libutil\utils.c(396): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
D:\derek\dr\git\src\libutil\utils.c(396): note: consider using '%lS' in the format string
D:\derek\dr\git\src\libutil\utils.c(396): note: consider using '%llS' in the format string
D:\derek\dr\git\src\libutil\utils.c(396): note: consider using '%LS' in the format string
D:\derek\dr\git\src\libutil\utils.c(396): note: consider using '%wS' in the format string

derekbruening avatar Oct 07 '16 16:10 derekbruening

I have the same issue -> When do you support VS2015 ?

hugoMeier avatar Oct 13 '16 12:10 hugoMeier

Building DR itself with VS2015 is not high priority for us and would be better driven by a contributor. Please see https://github.com/DynamoRIO/dynamorio/wiki/Contributing if you are interested in contributing.

derekbruening avatar Oct 13 '16 14:10 derekbruening

Duplicate -- there's more info in #2166 so closing this one.

derekbruening avatar Apr 12 '18 14:04 derekbruening