Skip to content

perplexity : fix format specifier in LOG_ERR - #23788

Merged
ggerganov merged 1 commit into
ggml-org:masterfrom
angt:perplexity-fix-format-specifier-in-log_err
May 28, 2026
Merged

ggerganov merged 1 commit into
ggml-org:masterfrom
angt:perplexity-fix-format-specifier-in-log_err

Conversation

@angt

@angt angt commented May 27, 2026

Copy link
Copy Markdown
Member

Overview

perplexity : fix format specifier in LOG_ERR

Additional information

Fix the following warnings:

/home/angt/insta/deps/llamacpp/tools/perplexity/perplexity.cpp:926:111: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned long long') [-Wformat]
  926 |             LOG_ERR("%s : task %zu does not fit in the context window (requires %lu tokens)\n", __func__, i0, hs_data[i0].required_tokens);
      |                                                                                 ~~~                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                 %zu
/home/angt/insta/deps/llamacpp/common/./log.h:118:71: note: expanded from macro 'LOG_ERR'
  118 | #define LOG_ERR(...) LOG_TMPL(GGML_LOG_LEVEL_ERROR, LOG_LEVEL_ERROR,  __VA_ARGS__)
      |                                                                       ^~~~~~~~~~~
/home/angt/insta/deps/llamacpp/common/./log.h:107:56: note: expanded from macro 'LOG_TMPL'
  107 |             common_log_add(common_log_main(), (level), __VA_ARGS__); \
      |                                                        ^~~~~~~~~~~
/home/angt/insta/deps/llamacpp/tools/perplexity/perplexity.cpp:1219:111: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned long long') [-Wformat]
 1219 |             LOG_ERR("%s : task %zu does not fit in the context window (requires %lu tokens)\n", __func__, i0, data[i0].required_tokens);
      |                                                                                 ~~~                           ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                 %zu
/home/angt/insta/deps/llamacpp/common/./log.h:118:71: note: expanded from macro 'LOG_ERR'
  118 | #define LOG_ERR(...) LOG_TMPL(GGML_LOG_LEVEL_ERROR, LOG_LEVEL_ERROR,  __VA_ARGS__)
      |                                                                       ^~~~~~~~~~~
/home/angt/insta/deps/llamacpp/common/./log.h:107:56: note: expanded from macro 'LOG_TMPL'
  107 |             common_log_add(common_log_main(), (level), __VA_ARGS__); \
      |                                                        ^~~~~~~~~~~
/home/angt/insta/deps/llamacpp/tools/perplexity/perplexity.cpp:1598:111: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned long long') [-Wformat]
 1598 |             LOG_ERR("%s : task %zu does not fit in the context window (requires %lu tokens)\n", __func__, i0, tasks[i0].required_tokens);
      |                                                                                 ~~~                           ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                 %zu
/home/angt/insta/deps/llamacpp/common/./log.h:118:71: note: expanded from macro 'LOG_ERR'
  118 | #define LOG_ERR(...) LOG_TMPL(GGML_LOG_LEVEL_ERROR, LOG_LEVEL_ERROR,  __VA_ARGS__)
      |                                                                       ^~~~~~~~~~~
/home/angt/insta/deps/llamacpp/common/./log.h:107:56: note: expanded from macro 'LOG_TMPL'
  107 |             common_log_add(common_log_main(), (level), __VA_ARGS__); \
      |                                                        ^~~~~~~~~~~
3 warnings generated.

Requirements

@angt
angt requested a review from ggerganov as a code owner May 27, 2026 17:09
@ggerganov
ggerganov merged commit 48e7eae into ggml-org:master May 28, 2026
31 checks passed
turbo-tan pushed a commit to turbo-tan/llama.cpp-tq3 that referenced this pull request Jun 2, 2026
zommiommy pushed a commit to zommiommy/llama.cpp that referenced this pull request Aug 18, 2026
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants