Use the %t format modifier to print differences between

pointers.  This fixes two format warnings on 64 bits
archs which are fatal now that WFORMAT=0 has been removed.

It doesn't fully fix the sh(1) build on 64 bits platforms
though, there is still some quad_t issues that need to be
fixed.

Tested on:	i386, sparc64
This commit is contained in:
Maxime Henrion 2002-10-01 08:40:07 +00:00
parent b7f23f5be5
commit ec65e9977a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104275
2 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@ bgcmd(int argc, char **argv)
continue;
restartjob(jp);
jp->foreground = 0;
fmtstr(s, 64, "[%d] ", jp - jobtab + 1);
fmtstr(s, 64, "[%td] ", jp - jobtab + 1);
out1str(s);
out1str(jp->ps[0].cmd);
out1c('\n');

View File

@ -393,7 +393,7 @@ digit_convert(void)
for (p = digit ; *p && *p != i ; p++);
if (*p == '\0')
p = digit;
fprintf(cfile, " %d,\n", p - digit);
fprintf(cfile, " %td,\n", p - digit);
}
fputs("};\n", cfile);
}