Explorar el Código

silence some clang warnings

ambrop7 hace 13 años
padre
commit
caa96cfbea

+ 1 - 1
CMakeLists.txt

@@ -107,7 +107,7 @@ if (NOT (SIZE_SIZE GREATER INT_SIZE OR SIZE_SIZE EQUAL INT_SIZE))
     message(FATAL_ERROR "size_t must be greater or equal than int")
 endif ()
 
-add_definitions(-std=gnu99 -Werror=implicit-function-declaration -Wno-unused-value -Wno-parentheses -Wno-switch-enum -Wredundant-decls)
+add_definitions(-std=gnu99 -Werror=implicit-function-declaration -Wno-unused-value -Wno-parentheses -Wno-switch-enum -Wno-switch -Wredundant-decls)
 
 # platform-specific stuff
 if (WIN32)

+ 1 - 1
generated/NCDConfigParser_parse.c

@@ -1444,7 +1444,7 @@ doneT:
 {
     ASSERT(yymsp[0].minor.yy0.str)
 
-    if (!NCDValue_InitStringBin(&yygotominor.yy43.v, yymsp[0].minor.yy0.str, yymsp[0].minor.yy0.len)) {
+    if (!NCDValue_InitStringBin(&yygotominor.yy43.v, (uint8_t *)yymsp[0].minor.yy0.str, yymsp[0].minor.yy0.len)) {
         goto failU0;
     }
 

+ 1 - 1
generated/NCDConfigParser_parse.y

@@ -578,7 +578,7 @@ map(R) ::= BRACKET_OPEN map_contents(A) BRACKET_CLOSE. {
 value(R) ::= STRING(A). {
     ASSERT(A.str)
 
-    if (!NCDValue_InitStringBin(&R.v, A.str, A.len)) {
+    if (!NCDValue_InitStringBin(&R.v, (uint8_t *)A.str, A.len)) {
         goto failU0;
     }
 

+ 1 - 1
ncd/NCDConfigParser_parse.y

@@ -578,7 +578,7 @@ map(R) ::= BRACKET_OPEN map_contents(A) BRACKET_CLOSE. {
 value(R) ::= STRING(A). {
     ASSERT(A.str)
 
-    if (!NCDValue_InitStringBin(&R.v, A.str, A.len)) {
+    if (!NCDValue_InitStringBin(&R.v, (uint8_t *)A.str, A.len)) {
         goto failU0;
     }