-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
When building flock 0.4.0 with GCC 11.1.0, I get the following compilation error:
src/flock.c: In function ‘main’:
src/flock.c:323:32: error: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘__suseconds_t’ {aka ‘long int’} [-Werror=format=]
323 | printf("took %1u microseconds\n", (t_l_acq.tv_usec - t_l_req.tv_usec)); // not adding due to time constraints
| ~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| unsigned int __suseconds_t {aka long int}
| %1lu
cc1: all warnings being treated as errors
As the compiler recommends, it can be fixed by simply replacing %1u with %1lu. After making this change Flock was successfully built on my system.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels