Add __attribute__((format(printf, fmt, va))) on TraceLog and TextFormat#5627
Add __attribute__((format(printf, fmt, va))) on TraceLog and TextFormat#5627AntoinePerrin25 wants to merge 3 commits intoraysan5:masterfrom
Conversation
maiconpintoabreu
left a comment
There was a problem hiding this comment.
I think you commit errors.txt by mistake.
3181b46 to
dc3e711
Compare
|
It was to show the errors caused after adding the attribute but removed it, ty |
|
You can add the error on the description |
|
Went to the examples, compiled them, 2 warnings, fixed them : core/core_storage_values.c:136:165: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] models/models_loading_vox.c:70:28: warning: format string is not a string literal (potentially insecure) [-Wformat-security] |
clang -c rcore.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP_GLFW -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include |
|
@AntoinePerrin25 Just tested the 2 examples and I could not see any Warning, I am stopping here as I do not get the propose of the change. |
The millions of warnings were from the first commit for raylib-master/src |
|
@AntoinePerrin25 Thanks but I really can't see the need for this change and it adds affitional undesired complexity to the library. |
Added this attribute to raylib.h, and fixed warning caused by using the functions with the wrong format