[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wlogica
[ https://issues.apache.org/jira/browse/HAWQ-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hongwu updated HAWQ-1188: - Issue Type: Sub-task (was: Improvement) Parent: HAWQ-1181 > Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, > -Wpointer-bool-conversion, -Wnon-literal-null-conversion, > -Wincompatible-pointer-types, -Wlogical-not-parentheses" compile warnings > under osx. > - > > Key: HAWQ-1188 > URL: https://issues.apache.org/jira/browse/HAWQ-1188 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Build >Reporter: hongwu >Assignee: hongwu > > {code} > fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type > 'ExecStatusType' is always false > [-Wtautological-constant-out-of-range-compare] > if (status < 0 || status >= sizeof pgresStatus / sizeof > pgresStatus[0]) > ~~ ^ ~~ > 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 > -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS > -DUNSAFE_STAT_OK -I. -I../../../src/include > -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include > > -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include > -I../../../src/port -c -o fe-exec.o fe-exec.c > fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type > 'ExecStatusType' is always false > [-Wtautological-constant-out-of-range-compare] > if ((int)status < 0 || status >= sizeof pgresStatus / sizeof > pgresStatus[0]) >~~ ^ > ~~ > md.c:1289:77: warning: comparison of constant 0 with boolean expression is > always false [-Wtautological-constant-out-of-range-compare] > if (!MirroredBufferPool_Truncate(>mdmir_open, > lastsegblocks * BLCKSZ) < 0) > > ^ ~ > 2 warnings generated. > segadmin.c:112:30: warning: comparison of constant 32 with boolean expression > is always false [-Wtautological-constant-out-of-range-compare] > if ((flags && STANDBY_ONLY) == STANDBY_ONLY) > ~~~ ^ > 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe > -I../../../src/include > -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include > > -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include > -c -o cdbgang.o cdbgang.c > cdbgang.c:447:61: warning: comparison of constant 10 with expression of type > 'GangType' (aka 'enum GangType') is always false > [-Wtautological-constant-out-of-range-compare] > if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || > gp->size > 10) > ^ ~~ > 1 warning generated. > fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always > evaluate to 'true' [-Wpointer-bool-conversion] > if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) > != 0) > ~~^ > fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always > evaluate to 'true' [-Wpointer-bool-conversion] > !res->cmdStatus || > ~~^ > 3 warnings 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe > -I../../../src/include > -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include > >
[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wlogica
[ https://issues.apache.org/jira/browse/HAWQ-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hongwu updated HAWQ-1188: - Description: {code} fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare] if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0]) ~~ ^ ~~ 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 -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DUNSAFE_STAT_OK -I. -I../../../src/include -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include -I../../../src/port -c -o fe-exec.o fe-exec.c fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare] if ((int)status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0]) ~~ ^ ~~ md.c:1289:77: warning: comparison of constant 0 with boolean expression is always false [-Wtautological-constant-out-of-range-compare] if (!MirroredBufferPool_Truncate(>mdmir_open, lastsegblocks * BLCKSZ) < 0) ^ ~ 2 warnings generated. segadmin.c:112:30: warning: comparison of constant 32 with boolean expression is always false [-Wtautological-constant-out-of-range-compare] if ((flags && STANDBY_ONLY) == STANDBY_ONLY) ~~~ ^ 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe -I../../../src/include -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include -c -o cdbgang.o cdbgang.c cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 'GangType' (aka 'enum GangType') is always false [-Wtautological-constant-out-of-range-compare] if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || gp->size > 10) ^ ~~ 1 warning generated. fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) != 0) ~~^ fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always evaluate to 'true' [-Wpointer-bool-conversion] !res->cmdStatus || ~~^ 3 warnings 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe -I../../../src/include -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include -c -o cdbsreh.o cdbsreh.c cdbsreh.c:350:14: warning: address of array 'cdbsreh->filename' will always evaluate to 'true' [-Wpointer-bool-conversion] if(cdbsreh->filename) ~~ ~^~~~ 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 -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include -I../../../src/port -I../../../src/port
[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wlogica
[ https://issues.apache.org/jira/browse/HAWQ-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hongwu updated HAWQ-1188: - Summary: Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wlogical-not-parentheses" compile warnings under osx. (was: Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wformat-extra-args, -Wformat, -Wlogical-not-parentheses" compile warnings under osx.) > Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, > -Wpointer-bool-conversion, -Wnon-literal-null-conversion, > -Wincompatible-pointer-types, -Wlogical-not-parentheses" compile warnings > under osx. > - > > Key: HAWQ-1188 > URL: https://issues.apache.org/jira/browse/HAWQ-1188 > Project: Apache HAWQ > Issue Type: Improvement > Components: Build >Reporter: hongwu >Assignee: hongwu > > {code} > fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type > 'ExecStatusType' is always false > [-Wtautological-constant-out-of-range-compare] > if (status < 0 || status >= sizeof pgresStatus / sizeof > pgresStatus[0]) > ~~ ^ ~~ > 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 > -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS > -DUNSAFE_STAT_OK -I. -I../../../src/include > -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include > > -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include > -I../../../src/port -c -o fe-exec.o fe-exec.c > fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type > 'ExecStatusType' is always false > [-Wtautological-constant-out-of-range-compare] > if ((int)status < 0 || status >= sizeof pgresStatus / sizeof > pgresStatus[0]) >~~ ^ > ~~ > md.c:1289:77: warning: comparison of constant 0 with boolean expression is > always false [-Wtautological-constant-out-of-range-compare] > if (!MirroredBufferPool_Truncate(>mdmir_open, > lastsegblocks * BLCKSZ) < 0) > > ^ ~ > 2 warnings generated. > segadmin.c:112:30: warning: comparison of constant 32 with boolean expression > is always false [-Wtautological-constant-out-of-range-compare] > if ((flags && STANDBY_ONLY) == STANDBY_ONLY) > ~~~ ^ > 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe > -I../../../src/include > -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include > > -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include > -c -o cdbgang.o cdbgang.c > cdbgang.c:447:61: warning: comparison of constant 10 with expression of type > 'GangType' (aka 'enum GangType') is always false > [-Wtautological-constant-out-of-range-compare] > if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || > gp->size > 10) > ^ ~~ > 1 warning generated. > fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always > evaluate to 'true' [-Wpointer-bool-conversion] > if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) > != 0) > ~~^ > fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always > evaluate to 'true' [-Wpointer-bool-conversion] > !res->cmdStatus || > ~~^ > 3 warnings generated. > gcc -O3 -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith > -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv >