[Maria-developers] Get rid of all 32 bit Visual Studio compiler warnings
Hi all, I'm sending this patch again, since I didn't get any responses to the last two mails. The patch is almost identical to the last version except that I have removed some parts of it - those warnings were fixed by someone else after I sent the last version of the patch. Here is the patch description from the last mail: This is a new version of the patch, and it removes all compiler warnings on a 32 bit build using Visual Studio 2008. This patch sets a compiler flag on the bison and flex generated files that removes warnings on those. (That nothing uses the yyerrorlab label is fine.) The libmysqld.def file: The description line isn't supported in the more recent compilers. In fsp0fsp.c, there is an explicit cast to ullint. In this case, the code does what's intended, and the compiler warning is one of the "are you sure this is right" warnings. C4334 gives a warning if you make a 1u << 10 and store that in a 64 bit variable, because you could have meant 1i64 << 10. Can I push this to 5.1? Bo Thorsen. Monty Program AB. -- MariaDB: MySQL replacement Community developed. Feature enhanced. Backward compatible.
Hi, Bo! It looks ok to me, but see below. On Aug 18, Bo Thorsen wrote:
=== modified file 'libmysqld/CMakeLists.txt' --- libmysqld/CMakeLists.txt 2010-07-01 14:35:50 +0000 +++ libmysqld/CMakeLists.txt 2010-07-08 14:34:03 +0000 @@ -95,6 +95,11 @@ FOREACH(rpath ${${ENGINE_LIB_UPPER}_SOURCES}) SET(LIB_SOURCES ${LIB_SOURCES} ${CMAKE_SOURCE_DIR}/storage/${ENGINE_DIR}/${rpath}) ENDFOREACH(rpath) + IF(CMAKE_GENERATOR MATCHES "Visual Studio") + # Silence two warnings in generated flex and bison output + SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/storage/${ENGINE_DIR}/pars/pars0grm.c PROPERTIES COMPILE_FLAGS "/wd4102") + SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/storage/${ENGINE_DIR}/pars/lexyy.c PROPERTIES COMPILE_FLAGS "/wd4003") + ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio") ENDFOREACH(ENGINE_LIB)
Why do you need it in libmysqld/ ? I thought having it only in innodb_plugin and xtradb should be enough.
SET(SOURCE_SUBLIBS FALSE)
=== modified file 'storage/innobase/CMakeLists.txt.disabled' --- storage/innobase/CMakeLists.txt.disabled 2010-06-01 06:40:36 +0000 +++ storage/innobase/CMakeLists.txt.disabled 2010-07-08 13:24:46 +0000 @@ -26,6 +26,12 @@ PROPERTIES COMPILE_FLAGS -Od) ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8)
+IF(CMAKE_GENERATOR MATCHES "Visual Studio") + # Silence two warnings in generated flex and bison output + SET_SOURCE_FILES_PROPERTIES(pars/pars0grm.c PROPERTIES COMPILE_FLAGS "/wd4102") + SET_SOURCE_FILES_PROPERTIES(pars/lexyy.c PROPERTIES COMPILE_FLAGS "/wd4003") +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio") + INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/storage/innobase/include ${CMAKE_SOURCE_DIR}/storage/innobase/handler
Better not change innobase/ files. We don't use it ever, so any change may only cause merge conflicts. Regards, Sergei
participants (2)
-
Bo Thorsen
-
Sergei Golubchik