cglm icon indicating copy to clipboard operation
cglm copied to clipboard

include/cglm/io.h:70:38: error: unused parameter 'ostream' [-Werror,-Wunused-parameter]

Open yurivict opened this issue 2 years ago • 5 comments

Compilation fails:

In file included from ../src/io.c:10:
In file included from ../src/../include/cglm/cglm.h:30:
../src/../include/cglm/io.h:70:38: error: unused parameter 'ostream' [-Werror,-Wunused-parameter]
glm_arch_print_name(FILE* __restrict ostream) {
                                     ^
1 error generated.

Version: 0.9.0 clang-16 FreeBSD 13.2

yurivict avatar Jul 08 '23 03:07 yurivict

Hi @yurivict

Did you compile latest sources may I ask?

recp avatar Jul 08 '23 09:07 recp

This is for the FreeBSD port so we only use the last release. Removing -Werror solved the problem.

yurivict avatar Jul 08 '23 17:07 yurivict

It is great to see the issue is fixed but,

I have just tried to build cglm on FreeBSD 13 ( aarch64 ), it succeeded without warnings and errors with Autotools and CMake. I did not install clang on FreeBSD yet but clang on macOS dont throw ant warnings/errors.

Maybe we should drop Werror for all build files?

recp avatar Jul 08 '23 18:07 recp

I believe this issue was fixed in 0.9.1. This version hasn't been released yet, so FreeBSD Ports is still bundling 0.9.0.

For reference (this is bad, don't do it), compiling master with clang -Weverything -Wno-reserved-macro-identifier -Wno-documentation-pedantic -Wno-float-equal spits out:

cglm/include/cglm/bezier.h:124:15: warning: implicit conversion from 'int' to 'float' may lose precision [-Wimplicit-int-float-conversion]
  for (i = 0; i < CGLM_DECASTEL_MAX; i++) {

And a few other useless warnings.

gottfriedleibniz avatar Jul 08 '23 19:07 gottfriedleibniz

https://github.com/recp/cglm/commit/93cdc897a57275c83bfc37efab8039f30efe8075 should fix that warning thanks :)

Also this PR (https://github.com/recp/cglm/pull/328) drops Werror

recp avatar Jul 08 '23 20:07 recp