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

pcsc-lite: fix formats under musl #194

Closed
wants to merge 1 commit into from
Closed

Conversation

neheb
Copy link
Contributor

@neheb neheb commented Jun 30, 2024

pthread_t is a pointer.

pthread_t is a pointer.

Signed-off-by: Rosen Penev <[email protected]>
@LudovicRousseau
Copy link
Owner

What is the error message exactly?

pthread_t may be anything.

@neheb
Copy link
Contributor Author

neheb commented Jun 30, 2024

../src/debuglog.c: In function 'log_line':
../src/debuglog.c:279:40: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'pthread_t' {aka 'struct __pthread *'} [-Werror=format=]
  279 |                                 printf("%s%.8d%s [" THREAD_FORMAT "] %s%s%s, %s%s%s\n",
      |                                        ^~~~~~~~~~~~
  280 |                                         time_pfx, delta, time_sfx, thread_id,
      |                                                                    ~~~~~~~~~
      |                                                                    |
      |                                                                    pthread_t {aka struct __pthread *}
../src/debuglog.c:268:26: note: format string is defined here
  268 | #define THREAD_FORMAT "%lu"
      |                        ~~^
      |                          |
      |                          long unsigned int
../src/debuglog.c:285:40: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'pthread_t' {aka 'struct __pthread *'} [-Werror=format=]
  285 |                                 printf("%s%.8d%s [" THREAD_FORMAT "] %s%s%s\n",
      |                                        ^~~~~~~~~~~~
  286 |                                         time_pfx, delta, time_sfx, thread_id,
      |                                                                    ~~~~~~~~~
      |                                                                    |
      |                                                                    pthread_t {aka struct __pthread *}
../src/debuglog.c:268:26: note: format string is defined here
  268 | #define THREAD_FORMAT "%lu"
      |                        ~~^
      |                          |
      |                          long unsigned int
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.

@LudovicRousseau
Copy link
Owner

Fixed in 2c82451

Thanks

@neheb neheb deleted the form branch June 30, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants