Skip to content

compile error with gcc #5

Description

@clach04
C:\code\c\monocypher\kr>gmake
gcc -pedantic -Wall -Wextra -O3 -march=native -flto -o kr src/kr.c src/monocypher.c src/platform.c
gcc -pedantic -Wall -Wextra -O3 -march=native -flto -o test.out tests/tests.c tests/platform.c tests/utils.c src/monocypher.c
In file included from tests/tests.c:11:
tests/tests.c: In function 'p_encrypt_decrypt':
tests/platform.h:13:16: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=]
   13 | #define YELLOW "\033[0;33m"
      |                ^~~~~~~~~~~~
tests/tests.c:269:20: note: in expansion of macro 'YELLOW'
  269 |             printf(YELLOW "\tFile size:" BLUE " %lu bytes\n", fsize);
      |                    ^~~~~~
tests/tests.c:269:51: note: format string is defined here
  269 |             printf(YELLOW "\tFile size:" BLUE " %lu bytes\n", fsize);
      |                                                 ~~^
      |                                                   |
      |                                                   long unsigned int
      |                                                 %llu
tests/tests.c: In function 'p_password_enc_dec':
tests/platform.h:13:16: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=]
   13 | #define YELLOW "\033[0;33m"
      |                ^~~~~~~~~~~~
tests/tests.c:431:20: note: in expansion of macro 'YELLOW'
  431 |             printf(YELLOW "\tFile size:" BLUE " %lu bytes\n", fsize);
      |                    ^~~~~~
tests/tests.c:431:51: note: format string is defined here
  431 |             printf(YELLOW "\tFile size:" BLUE " %lu bytes\n", fsize);
      |                                                 ~~^
      |                                                   |
      |                                                   long unsigned int
      |                                                 %llu

The rest of the code does use stdint macros.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions