sizeof returns size_t (a unsigned integer with a high bit count) and has to be printed with the prefix before length motifier.
Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de --- batman-experimental/control.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/batman-experimental/control.c b/batman-experimental/control.c index de65e89..9491019 100644 --- a/batman-experimental/control.c +++ b/batman-experimental/control.c @@ -57,7 +57,7 @@ void init_control( void ) { // just to check if sizeof( struct xyz { char[] }__attribute__((packed)); ) is zero for all compilers... if ( sizeof( struct cntl_msg ) != 20 ) { - printf( "sizeof cntl_msg %d MUST BE 20 !!!\n", sizeof( struct cntl_msg ) ); + printf( "sizeof cntl_msg %zu MUST BE 20 !!!\n", sizeof( struct cntl_msg ) ); exit(EXIT_FAILURE); }