4ZM / mfterm

Terminal for working with Mifare Classic 1-4k Tags
GNU General Public License v3.0
149 stars 36 forks source link

64-bit printf errors #17

Closed 4ZM closed 12 years ago

4ZM commented 12 years ago

size_t is 4bytes on 64 bit arch.. This makes a mess of a lot of printfs.

tag.c:171:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat] tag.c:171:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat] tag.c:171:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] tag.c:171:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat] gcc -g -Wall -std=c99 -c mifare.c gcc -g -Wall -std=c99 -c mifare_ctrl.c mifare_ctrl.c: In function ‘mf_read_tag_internal’: mifare_ctrl.c:272:9: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t’ [-Wformat] mifare_ctrl.c: In function ‘mf_write_tag_internal’: mifare_ctrl.c:340:7: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t’ [-Wformat] mifare_ctrl.c: In function ‘mf_dictionary_attack_internal’: mifare_ctrl.c:410:5: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t’ [-Wformat] mifare_ctrl.c: In function ‘mf_test_auth_internal’: mifare_ctrl.c:493:12: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t’ [-Wformat] gcc -g -Wall -std=c99 -c dictionary.c gcc -g -Wall -std=c99 -c spec_syntax.c spec_syntax.c: In function ‘print_instance_tree’: spec_syntax.c:560:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat] spec_syntax.c:560:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat] spec_syntax.c:560:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] spec_syntax.c:560:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat] spec_syntax.c: In function ‘printinstance’: spec_syntax.c:595:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat] spec_syntax.c:595:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat] spec_syntax.c:595:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] spec_syntax.c:595:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat] spec_syntax.c:595:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Wformat] spec_syntax.c:604:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat] spec_syntax.c:604:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat] spec_syntax.c:604:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] spec_syntax.c:604:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat] spec_syntax.c:604:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Wformat] spec_syntax.c:614:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat] spec_syntax.c:614:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat] spec_syntax.c:614:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] spec_syntax.c:614:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat] spec_syntax.c:614:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ [-Wformat]