Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 466492

Summary: app-portage/portage-utils-0.10 ABI=x32 printf(3) called with %lu for 64bit args
Product: Portage Development Reporter: James Cloos <cloos>
Component: ToolsAssignee: Portage Utils Team <portage-utils>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=548262
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 393673    

Description James Cloos 2013-04-19 18:23:17 UTC
The 64 bit arguments in question are of time_t, __time_t and __off_t:

qcheck.c:166:7: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘__time_t’ [-Wformat=]
       fprintf(fpx, "obj %s %s %lu\n", e->name, hashed_file, st.st_mtime);
qcheck.c:193:7: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘__time_t’ [-Wformat=]
       fprintf(fpx, "obj %s %s %lu\n", e->name, e->digest, st.st_mtime);
qcheck.c:216:6: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘__time_t’ [-Wformat=]
      fprintf(fpx, "sym %s -> %s %lu\n", e->name, e->sym_target, st.st_mtime);
qlop.c:212:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘time_t’ [-Wformat=]
         printf("%s%lu%s seconds", GREEN, (t[1] - t[0]), NORM);
qxpak.c:288:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘__off_t’ [-Wformat=]
   warnf("File is too big: %lu", st->st_size);


I’m not sure whether reports like this are wanted for bug #393673 (the x32 porting issues tracker) given that, since the arch is little endian, the results will be accurate as long as they are <4G.  Please note whether little things like this should be reported blocking #393673.