[GitHub] incubator-hawq pull request #1032: HAWQ-1184. Fix risky "-Wshift-negative-va...

2016-12-01 Thread xunzhang
Github user xunzhang closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1032


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1032: HAWQ-1184. Fix risky "-Wshift-negative-va...

2016-12-01 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1032#discussion_r90584055
  
--- Diff: src/backend/catalog/pg_filesystem.c ---
@@ -384,7 +384,7 @@ FileSystemGetNameByOid(Oid  fsysOid)
 
 char *fsys_func_type_to_name(FileSystemFuncType ftype)
 {
-   if(ftype < 0 || ftype >= FSYS_FUNC_TOTALNUM)
+   if (!(ftype >= FSYS_FUNC_CONNECT && ftype < FSYS_FUNC_TOTALNUM))
--- End diff --

@paul-guo- done


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1032: HAWQ-1184. Fix risky "-Wshift-negative-va...

2016-12-01 Thread paul-guo-
Github user paul-guo- commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1032#discussion_r90579306
  
--- Diff: src/backend/catalog/pg_filesystem.c ---
@@ -384,7 +384,7 @@ FileSystemGetNameByOid(Oid  fsysOid)
 
 char *fsys_func_type_to_name(FileSystemFuncType ftype)
 {
-   if(ftype < 0 || ftype >= FSYS_FUNC_TOTALNUM)
+   if (!(ftype >= FSYS_FUNC_CONNECT && ftype < FSYS_FUNC_TOTALNUM))
--- End diff --

It does not seem to need a conversion of !. 
The code below seems to apply either unsigned or signed type, which enum 
may use.
ftype < FSYS_FUNC_CONNECT || ftype >= FSYS_FUNC_TOTALNUM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1032: HAWQ-1184. Fix risky "-Wshift-negative-va...

2016-12-01 Thread xunzhang
GitHub user xunzhang opened a pull request:

https://github.com/apache/incubator-hawq/pull/1032

HAWQ-1184. Fix risky "-Wshift-negative-value, 
-Wparentheses-equality,-Wtautological-compare" types of compile warnings under 
osx.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/xunzhang/incubator-hawq HAWQ-1184

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1032.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1032


commit dcc45ba1b3e1eb90db13aface7f92bd59fd704ae
Author: xunzhang 
Date:   2016-12-01T15:30:01Z

HAWQ-1184. Fix risky "-Wshift-negative-value, -Wparentheses-equality, 
-Wtautological-compare" types of compile warnings under osx.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---