Skip to content

Conversation

@bandoti
Copy link
Collaborator

@bandoti bandoti commented Feb 11, 2025

Various warnings occur (of the form below) due to no defined gnu_printf on clang with MSYS2. In addition, a couple printfs have superfluous %s in the format string. Both of these issues are cleaned up in this PR.

In file included from ...include/llama.h:4:
...include/ggml.h:317:19: warning: 'format' attribute argument not supported: gnu_printf [-Wignored-
attributes]
  317 |     GGML_NORETURN GGML_ATTRIBUTE_FORMAT(3, 4)
      |                   ^
...include/ggml.h:202:55: note: expanded from macro 'GGML_ATTRIBUTE_FORMAT'
  202 | #    define GGML_ATTRIBUTE_FORMAT(...) __attribute__((format(gnu_printf, __VA_ARGS__)))
      |                                                       ^
...include/ggml.h:760:5: warning: 'format' attribute argument not supported: gnu_printf [-Wignored-a
ttributes]
  760 |     GGML_ATTRIBUTE_FORMAT(2, 3)

@github-actions github-actions bot added testing Everything test related ggml changes relating to the ggml tensor library for machine learning labels Feb 11, 2025
@bandoti bandoti changed the title Fix print warnings cleanup: fix compile warnings associated with gnu_printf Feb 11, 2025
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the !defined(__clang__) changes, so better wait for someone to confirm.

@bandoti bandoti merged commit fef0cbe into ggml-org:master Feb 12, 2025
46 checks passed
tinglou pushed a commit to tinglou/llama.cpp that referenced this pull request Feb 13, 2025
orca-zhang pushed a commit to orca-zhang/llama.cpp that referenced this pull request Feb 26, 2025
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Feb 26, 2025
mglambda pushed a commit to mglambda/llama.cpp that referenced this pull request Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants