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

Multiple test build problems due to printf'ing std::clock_t #778

Closed
AMDmi3 opened this issue Jun 6, 2018 · 2 comments
Closed

Multiple test build problems due to printf'ing std::clock_t #778

AMDmi3 opened this issue Jun 6, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@AMDmi3
Copy link

AMDmi3 commented Jun 6, 2018

FreeBSD 11.1, clang 4:

.../glm-0.9.9.0/test/core/core_func_matrix.cpp:300:71: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]                                                                       
        printf("inverse<%s>(%f): %lu\n", Message, static_cast<double>(Diff), EndTime - StartTime);                                                                                                                                                                    
                                 ~~~                                         ^~~~~~~~~~~~~~~~~~~                                                                                                                                                                      
                                 %d                                                                                                                                                                                                                                   

This problem exists in

  • test/gtc/gtc_integer.cpp
  • test/core/core_type_vec4.cpp
  • test/core/core_func_matrix.cpp
  • test/gtx/gtx_fast_trigonometry.cpp

std::clock_t size is unspecified, so passing it directly into printf is a bad idea. Either casts are needed, or printfs should be replaced with streams (which seems better and more C++ish solution to me).

@Groovounet Groovounet self-assigned this Jun 18, 2018
@Groovounet Groovounet added this to the GLM 0.9.9 milestone Jun 18, 2018
@Groovounet Groovounet added the bug label Jun 18, 2018
@Groovounet
Copy link
Member

This issue should be fixed in master branch for GLM 0.9.9.1 release.

Thanks for reporting,
Christophe

@AMDmi3
Copy link
Author

AMDmi3 commented Jun 18, 2018

Thanks!

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

No branches or pull requests

2 participants