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

gcc 9.3 complains about redundant function declarations: #78

Open
rhaschke opened this issue Oct 13, 2020 · 1 comment
Open

gcc 9.3 complains about redundant function declarations: #78

rhaschke opened this issue Oct 13, 2020 · 1 comment

Comments

@rhaschke
Copy link

Please fix the following warnings. Interestingly, gcc doesn't silence those warnings, even if the qhull includes are declared as
-isystem. I consider that a gcc bug...

In file included from /opt/ws_moveit/src/geometric_shapes/src/bodies.cpp:44:
394/usr/include/libqhull_r/libqhull_r.h:1057:9: warning: redundant redeclaration of ‘void qh_printsummary(qhT*, FILE*)’ in same scope [-Wredundant-decls]
395 1057 | void    qh_printsummary(qhT *qh, FILE *fp);
396      |         ^~~~~~~~~~~~~~~
397/usr/include/libqhull_r/libqhull_r.h:1024:9: note: previous declaration of ‘void qh_printsummary(qhT*, FILE*)’
398 1024 | void    qh_printsummary(qhT *qh, FILE *fp);
399      |         ^~~~~~~~~~~~~~~
400/usr/include/libqhull_r/libqhull_r.h:1099:6: warning: redundant redeclaration of ‘void qh_meminit(qhT*, FILE*)’ in same scope [-Wredundant-decls]
401 1099 | void qh_meminit(qhT *qh, FILE *ferr);
402      |      ^~~~~~~~~~
403In file included from /usr/include/libqhull_r/libqhull_r.h:31,
404                 from /opt/ws_moveit/src/geometric_shapes/src/bodies.cpp:44:
405/usr/include/libqhull_r/mem_r.h:218:6: note: previous declaration of ‘void qh_meminit(qhT*, FILE*)’
406  218 | void qh_meminit(qhT *qh, FILE *ferr);
407      |      ^~~~~~~~~~
408In file included from /opt/ws_moveit/src/geometric_shapes/src/bodies.cpp:44:
409/usr/include/libqhull_r/libqhull_r.h:1100:6: warning: redundant redeclaration of ‘void qh_memfreeshort(qhT*, int*, int*)’ in same scope [-Wredundant-decls]
410 1100 | void qh_memfreeshort(qhT *qh, int *curlong, int *totlong);
411      |      ^~~~~~~~~~~~~~~
412In file included from /usr/include/libqhull_r/libqhull_r.h:31,
413                 from /opt/ws_moveit/src/geometric_shapes/src/bodies.cpp:44:
414/usr/include/libqhull_r/mem_r.h:217:6: note: previous declaration of ‘void qh_memfreeshort(qhT*, int*, int*)’
415  217 | void qh_memfreeshort(qhT *qh, int *curlong, int *totlong);
416      |      ^~~~~~~~~~~~~~~
417In file included from /opt/ws_moveit/src/geometric_shapes/src/bodies.cpp:44:
418/usr/include/libqhull_r/libqhull_r.h:1123:9: warning: redundant redeclaration of ‘void qh_collectstatistics(qhT*)’ in same scope [-Wredundant-decls]
419 1123 | void    qh_collectstatistics(qhT *qh);
420      |         ^~~~~~~~~~~~~~~~~~~~
421In file included from /usr/include/libqhull_r/libqhull_r.h:121,
422                 from /opt/ws_moveit/src/geometric_shapes/src/bodies.cpp:44:
423/usr/include/libqhull_r/stat_r.h:515:9: note: previous declaration of ‘void qh_collectstatistics(qhT*)’
424  515 | void    qh_collectstatistics(qhT *qh);
425      |         ^~~~~~~~~~~~~~~~~~~~
426In file included from /opt/ws_moveit/src/geometric_shapes/src/bodies.cpp:44:
427/usr/include/libqhull_r/libqhull_r.h:1124:9: warning: redundant redeclaration of ‘void qh_printallstatistics(qhT*, FILE*, const char*)’ in same scope [-Wredundant-decls]
428 1124 | void    qh_printallstatistics(qhT *qh, FILE *fp, const char *string);
429      |         ^~~~~~~~~~~~~~~~~~~~~
430In file included from /usr/include/libqhull_r/libqhull_r.h:121,
431                 from /opt/ws_moveit/src/geometric_shapes/src/bodies.cpp:44:
432/usr/include/libqhull_r/stat_r.h:519:9: note: previous declaration of ‘void qh_printallstatistics(qhT*, FILE*, const char*)’
433  519 | void    qh_printallstatistics(qhT *qh, FILE *fp, const char *string);
434      |         ^~~~~~~~~~~~~~~~~~~~~
@cbbarber
Copy link
Collaborator

-Wredundant-decls should distinguish function redeclarations from variable redeclarations. Variable redeclarations change the code and should be avoided. Function redeclarations have no effect as far as I know.

Will leave open for the next release.

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