Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building produces several notes and warnings #4

Open
michaellindahl opened this issue Apr 23, 2020 · 2 comments
Open

Building produces several notes and warnings #4

michaellindahl opened this issue Apr 23, 2020 · 2 comments

Comments

@michaellindahl
Copy link

Building causes lots of warnings and notes around expecting different types and casting without conversions.

/tmp/build/php-h3/h3.c: In function 'zif_getH3UnidirectionalEdgesFromHexagon':
/tmp/build/php-h3/h3.c:817:64: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
         zend_resource *edges_resource = zend_register_resource(edges[i], le_h3_index);
                                                                ^~~~~
In file included from /usr/include/php/7.3/php/Zend/zend_API.h:26:0,
                 from /usr/include/php/7.3/php/main/php.h:37,
                 from /tmp/build/php-h3/h3.c:25:
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
 ZEND_API zend_resource *zend_register_resource(void *rsrc_pointer, int rsrc_type);
                         ^~~~~~~~~~~~~~~~~~~~~~
See complete list.

Truncated to just the lines that include warning and note.

/tmp/build/php-h3/h3.c:65:60: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:79:25: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
/tmp/build/php-h3/h3.c:98:60: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:153:13: warning: passing argument 1 of 'h3ToGeo' makes integer from pointer without a cast [-Wint-conversion]
/usr/local/include/h3/h3api.h:163:6: note: expected 'H3Index {aka long unsigned int}' but argument is of type 'H3Index * {aka long unsigned int *}'
/tmp/build/php-h3/h3.c:176:38: warning: passing argument 1 of 'h3GetResolution' makes integer from pointer without a cast [-Wint-conversion]
/usr/local/include/h3/h3api.h:312:5: note: expected 'H3Index {aka long unsigned int}' but argument is of type 'H3Index * {aka long unsigned int *}'
/tmp/build/php-h3/h3.c:190:47: warning: passing argument 1 of 'h3GetBaseCell' makes integer from pointer without a cast [-Wint-conversion]
/usr/local/include/h3/h3api.h:323:5: note: expected 'H3Index {aka long unsigned int}' but argument is of type 'H3Index * {aka long unsigned int *}'
/tmp/build/php-h3/h3.c:208:45: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:239:19: warning: passing argument 1 of 'h3IsValid' makes integer from pointer without a cast [-Wint-conversion]
/usr/local/include/h3/h3api.h:349:5: note: expected 'H3Index {aka long unsigned int}' but argument is of type 'H3Index * {aka long unsigned int *}'
/tmp/build/php-h3/h3.c:256:25: warning: passing argument 1 of 'h3IsResClassIII' makes integer from pointer without a cast [-Wint-conversion]
/usr/local/include/h3/h3api.h:410:5: note: expected 'H3Index {aka long unsigned int}' but argument is of type 'H3Index * {aka long unsigned int *}'
/tmp/build/php-h3/h3.c:272:33: warning: passing argument 1 of 'h3IsPentagon' makes integer from pointer without a cast [-Wint-conversion]
/usr/local/include/h3/h3api.h:418:5: note: expected 'H3Index {aka long unsigned int}' but argument is of type 'H3Index * {aka long unsigned int *}'
/tmp/build/php-h3/h3.c:294:11: warning: passing argument 1 of 'kRing' makes integer from pointer without a cast [-Wint-conversion]
/usr/local/include/h3/h3api.h:194:6: note: expected 'H3Index {aka long unsigned int}' but argument is of type 'H3Index * {aka long unsigned int *}'
/tmp/build/php-h3/h3.c:300:62: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:347:62: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:379:18: warning: passing argument 1 of 'hexRange' makes integer from pointer without a cast [-Wint-conversion]
/usr/local/include/h3/h3api.h:182:5: note: expected 'H3Index {aka long unsigned int}' but argument is of type 'H3Index * {aka long unsigned int *}'
/tmp/build/php-h3/h3.c:387:62: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:421:62: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:468:62: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:500:62: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:523:60: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:546:69: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:589:17: warning: passing argument 1 of 'compact' from incompatible pointer type [-Wincompatible-pointer-types]
/usr/local/include/h3/h3api.h:387:5: note: expected 'const H3Index * {aka const long unsigned int *}' but argument is of type 'H3Index ** {aka long unsigned int **}'
/tmp/build/php-h3/h3.c:597:62: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:632:44: warning: passing argument 1 of 'maxUncompactSize' from incompatible pointer type [-Wincompatible-pointer-types]
/usr/local/include/h3/h3api.h:397:5: note: expected 'const H3Index * {aka const long unsigned int *}' but argument is of type 'H3Index ** {aka long unsigned int **}'
/tmp/build/php-h3/h3.c:634:19: warning: passing argument 1 of 'uncompact' from incompatible pointer type [-Wincompatible-pointer-types]
/usr/local/include/h3/h3api.h:401:5: note: expected 'const H3Index * {aka const long unsigned int *}' but argument is of type 'H3Index ** {aka long unsigned int **}'
/tmp/build/php-h3/h3.c:642:62: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:677:50: warning: passing argument 1 of 'maxUncompactSize' from incompatible pointer type [-Wincompatible-pointer-types]
/usr/local/include/h3/h3api.h:397:5: note: expected 'const H3Index * {aka const long unsigned int *}' but argument is of type 'H3Index ** {aka long unsigned int **}'
/tmp/build/php-h3/h3.c:718:60: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:752:60: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:769:60: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:790:76: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
/tmp/build/php-h3/h3.c:817:64: warning: passing argument 1 of 'zend_register_resource' makes pointer from integer without a cast [-Wint-conversion]
/usr/include/php/7.3/php/Zend/zend_list.h:60:25: note: expected 'void *' but argument is of type 'H3Index {aka long unsigned int}'
@JavierSolis
Copy link

how do i generate the php-h3 folder??

@michaellindahl
Copy link
Author

@JavierSolis The php-h3 folder in my example above was created by running git clone https://github.com/neatlife/php-h3.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants