[GH-ISSUE #500] linux-x86-native build, warning in luks2john.c #204

Closed
opened 2026-10-14 02:56:15 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @frank-dittrich on GitHub (Feb 9, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/500

$ make clean > /dev/null; make linux-x86-native > /dev/null
...
luks2john.c: In function ‘hash_plugin_parse_hash’:
luks2john.c:149:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat=]
printf("$luks$1$%lu$", sizeof(myphdr));

s/sizeof(myphdr)/(long unsigned int) sizeof(myphdr)/ should work here.

Originally created by @frank-dittrich on GitHub (Feb 9, 2014). Original GitHub issue: https://github.com/openwall/john/issues/500 $ make clean > /dev/null; make linux-x86-native > /dev/null ... luks2john.c: In function ‘hash_plugin_parse_hash’: luks2john.c:149:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat=] printf("$luks$1$%lu$", sizeof(myphdr)); s/sizeof(myphdr)/(long unsigned int) sizeof(myphdr)/ should work here.
Author
Owner

@magnumripper commented on GitHub (Feb 9, 2014):

%zu will work too

<!-- gh-comment-id:34575146 --> @magnumripper commented on GitHub (Feb 9, 2014): `%zu` will work too
bsakaguchi changed title from [GH-ISSUE #500] linux-x86-native build, warning in luks2john.c to [GH-ISSUE #500] linux-x86-native build, warning in luks2john.c 2026-10-14 04:17:48 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#204
No description provided.