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

Fix size_t format specifiers on 32 bit systems #6065

Merged
merged 1 commit into from
May 20, 2024

Commits on May 20, 2024

  1. Fix size_t format specifiers on 32 bit systems

    This fixes the following warnings on 32 bit systems
    
    [60/108] Compiling C object i3.p/src_regex.c.o
    In file included from ../include/all.h:40,
                     from ../src/regex.c:10:
    ../src/regex.c: In function ‘regex_new’:
    ../include/log.h:29:33: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
       29 | #define ELOG(fmt, ...) errorlog("ERROR: " fmt, ##__VA_ARGS__)
          |                                 ^~~~~~~~~
    ../src/regex.c:35:9: note: in expansion of macro ‘ELOG’
       35 |         ELOG("PCRE regular expression compilation failed at %lu: %s\n",
          |         ^~~~
    [93/108] Compiling C object i3-input.p/i3-input_main.c.o
    ../i3-input/main.c: In function ‘finish_input’:
    ../i3-input/main.c:173:29: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
      173 |     printf("occurrences = %ld\n", cnt);
          |                           ~~^     ~~~
          |                             |     |
          |                             |     size_t {aka unsigned int}
          |                             long int
          |                           %d
    tatokis committed May 20, 2024
    Configuration menu
    Copy the full SHA
    eea8067 View commit details
    Browse the repository at this point in the history