[jira] [Updated] (HAWQ-1187) Fix "-Wsometimes-uninitialized, -Wsizeof-pointer-memaccess, -Wdangling-else, -Wheader-guard, -Wenum-conversion, -Winvalid-source-encoding" compile warnings under osx
[ https://issues.apache.org/jira/browse/HAWQ-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hongwu updated HAWQ-1187: - Issue Type: Sub-task (was: Improvement) Parent: HAWQ-1181 > Fix "-Wsometimes-uninitialized, -Wsizeof-pointer-memaccess, -Wdangling-else, > -Wheader-guard, -Wenum-conversion, -Winvalid-source-encoding" compile > warnings under osx > - > > Key: HAWQ-1187 > URL: https://issues.apache.org/jira/browse/HAWQ-1187 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Build >Reporter: hongwu >Assignee: hongwu > > http://pastebin.com/VWSuCwsC > {code} > aosegfiles.c:1105:6: warning: variable 'returnDatum' is used uninitialized > whenever 'if' condition is false [-Wsometimes-uninitialized] > if (RelationIsAoRows(parentrel)) > ^~~ > ../../../../src/include/utils/rel.h:364:2: note: expanded from macro > 'RelationIsAoRows' > ((bool)(((relation)->rd_rel->relstorage == RELSTORAGE_AOROWS))) > ^~~ > aosegfiles.c:1112:9: note: uninitialized use occurs here > return returnDatum; >^~~ > aosegfiles.c:1105:2: note: remove the 'if' if its condition is always true > if (RelationIsAoRows(parentrel)) > ^~~~ > aosegfiles.c:1094:21: note: initialize the variable 'returnDatum' to silence > this warning > Datum returnDatum; >^ > = 0 > tablecmds.c:902:7: warning: variable 'result' is used uninitialized whenever > 'if' condition is false [-Wsometimes-uninitialized] > if (astate) > ^~ > tablecmds.c:905:10: note: uninitialized use occurs here > return result; >^~ > tablecmds.c:902:3: note: remove the 'if' if its condition is always true > if (astate) > ^~~ > tablecmds.c:803:14: note: initialize the variable 'result' to silence this > warning > Datum result; > ^ > = 0 > tablecmds.c:4740:15: warning: variable 'l1' is used uninitialized whenever > 'if' condition is false [-Wsometimes-uninitialized] > else if (!is_at) > ^~ > tablecmds.c:4750:23: note: uninitialized use occurs here > if (IsA(linitial(l1), A_Const) || > ^~ > ../../../src/include/nodes/pg_list.h:124:41: note: expanded from macro > 'linitial' > #define linitial(l) lfirst(list_head(l)) > ^ > ../../../src/include/nodes/pg_list.h:120:25: note: expanded from macro > 'lfirst' > #define lfirst(lc) ((lc)->data.ptr_value) > ^~ > ../../../src/include/nodes/nodes.h:595:39: note: expanded from macro 'IsA' > #define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_) > ^~~ > ../../../src/include/nodes/nodes.h:549:37: note: expanded from macro 'nodeTag' > #define nodeTag(nodeptr)(((Node*)(nodeptr))->type) > ^~~ > tablecmds.c:4740:11: note: remove the 'if' if its condition is always true > else if (!is_at) > ^~~ > tablecmds.c:4729:14: note: initialize the variable 'l1' to silence this > warning > List *l1; > ^ > = NULL > setrefs.c:1465:7: warning: variable 'bitmapqualorig_p' is used uninitialized > whenever 'if' condition is false [-Wsometimes-uninitialized] > if (IsA(inner_plan, BitmapHeapScan)) > ^~~ > ../../../../src/include/nodes/nodes.h:595:30: note: expanded from macro 'IsA' > #define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_) > ^~~~ > setrefs.c:1473:28: note: uninitialized use occurs here > if (NumRelids((Node *) (*bitmapqualorig_p)) > 1) > ^~~~ > setrefs.c:1465:3: note: remove the 'if' if its condition is always true >
[jira] [Updated] (HAWQ-1187) Fix "-Wsometimes-uninitialized, -Wsizeof-pointer-memaccess, -Wdangling-else, -Wheader-guard, -Wenum-conversion, -Winvalid-source-encoding" compile warnings under osx
[ https://issues.apache.org/jira/browse/HAWQ-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hongwu updated HAWQ-1187: - Description: http://pastebin.com/VWSuCwsC {code} aosegfiles.c:1105:6: warning: variable 'returnDatum' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (RelationIsAoRows(parentrel)) ^~~ ../../../../src/include/utils/rel.h:364:2: note: expanded from macro 'RelationIsAoRows' ((bool)(((relation)->rd_rel->relstorage == RELSTORAGE_AOROWS))) ^~~ aosegfiles.c:1112:9: note: uninitialized use occurs here return returnDatum; ^~~ aosegfiles.c:1105:2: note: remove the 'if' if its condition is always true if (RelationIsAoRows(parentrel)) ^~~~ aosegfiles.c:1094:21: note: initialize the variable 'returnDatum' to silence this warning Datum returnDatum; ^ = 0 tablecmds.c:902:7: warning: variable 'result' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (astate) ^~ tablecmds.c:905:10: note: uninitialized use occurs here return result; ^~ tablecmds.c:902:3: note: remove the 'if' if its condition is always true if (astate) ^~~ tablecmds.c:803:14: note: initialize the variable 'result' to silence this warning Datum result; ^ = 0 tablecmds.c:4740:15: warning: variable 'l1' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if (!is_at) ^~ tablecmds.c:4750:23: note: uninitialized use occurs here if (IsA(linitial(l1), A_Const) || ^~ ../../../src/include/nodes/pg_list.h:124:41: note: expanded from macro 'linitial' #define linitial(l) lfirst(list_head(l)) ^ ../../../src/include/nodes/pg_list.h:120:25: note: expanded from macro 'lfirst' #define lfirst(lc) ((lc)->data.ptr_value) ^~ ../../../src/include/nodes/nodes.h:595:39: note: expanded from macro 'IsA' #define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_) ^~~ ../../../src/include/nodes/nodes.h:549:37: note: expanded from macro 'nodeTag' #define nodeTag(nodeptr)(((Node*)(nodeptr))->type) ^~~ tablecmds.c:4740:11: note: remove the 'if' if its condition is always true else if (!is_at) ^~~ tablecmds.c:4729:14: note: initialize the variable 'l1' to silence this warning List *l1; ^ = NULL setrefs.c:1465:7: warning: variable 'bitmapqualorig_p' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (IsA(inner_plan, BitmapHeapScan)) ^~~ ../../../../src/include/nodes/nodes.h:595:30: note: expanded from macro 'IsA' #define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_) ^~~~ setrefs.c:1473:28: note: uninitialized use occurs here if (NumRelids((Node *) (*bitmapqualorig_p)) > 1) ^~~~ setrefs.c:1465:3: note: remove the 'if' if its condition is always true if (IsA(inner_plan, BitmapHeapScan)) ^~~~ setrefs.c:1464:26: note: initialize the variable 'bitmapqualorig_p' to silence this warning List **bitmapqualorig_p; ^ = NULL 1 warning generated. gcc -O3 -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -I/usr/local/Cellar/curl/7.49.1/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2 -I../../../../src/backend/gp_libpq_fe -I../../../../src/include -I/Users/wuhong/Desktop/tmp/tmp2/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
[jira] [Updated] (HAWQ-1187) Fix "-Wsometimes-uninitialized, -Wsizeof-pointer-memaccess, -Wdangling-else, -Wheader-guard, -Wenum-conversion, -Winvalid-source-encoding" compile warnings under osx
[ https://issues.apache.org/jira/browse/HAWQ-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hongwu updated HAWQ-1187: - Issue Type: Improvement (was: Bug) > Fix "-Wsometimes-uninitialized, -Wsizeof-pointer-memaccess, -Wdangling-else, > -Wheader-guard, -Wenum-conversion, -Winvalid-source-encoding" compile > warnings under osx > - > > Key: HAWQ-1187 > URL: https://issues.apache.org/jira/browse/HAWQ-1187 > Project: Apache HAWQ > Issue Type: Improvement > Components: Build >Reporter: hongwu >Assignee: hongwu > > http://pastebin.com/VWSuCwsC -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HAWQ-1187) Fix "-Wsometimes-uninitialized, -Wsizeof-pointer-memaccess, -Wdangling-else, -Wheader-guard, -Wenum-conversion, -Winvalid-source-encoding" compile warnings under osx
[ https://issues.apache.org/jira/browse/HAWQ-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hongwu updated HAWQ-1187: - Description: http://pastebin.com/VWSuCwsC > Fix "-Wsometimes-uninitialized, -Wsizeof-pointer-memaccess, -Wdangling-else, > -Wheader-guard, -Wenum-conversion, -Winvalid-source-encoding" compile > warnings under osx > - > > Key: HAWQ-1187 > URL: https://issues.apache.org/jira/browse/HAWQ-1187 > Project: Apache HAWQ > Issue Type: Bug > Components: Build >Reporter: hongwu >Assignee: Lei Chang > > http://pastebin.com/VWSuCwsC -- This message was sent by Atlassian JIRA (v6.3.4#6332)