From 48b1e29a7dc74c6cb1d3e33103b8c09e63c10015 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 30 Aug 2006 13:18:40 +0000 Subject: 2006-08-30 Joel Sherrill * libcsupport/src/utsname.c, libnetworking/libc/res_debug.c, libnetworking/net/if_media.h, libnetworking/rtems/rtems_mii_ioctl.c, librpc/src/rpc/svc_simple.c: Remove printf format warnings. --- cpukit/ChangeLog | 6 ++++++ cpukit/libcsupport/src/utsname.c | 2 +- cpukit/libnetworking/libc/res_debug.c | 4 +++- cpukit/libnetworking/net/if_media.h | 2 +- cpukit/libnetworking/rtems/rtems_mii_ioctl.c | 5 +++-- cpukit/librpc/src/rpc/svc_simple.c | 4 +++- 6 files changed, 17 insertions(+), 6 deletions(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 373fc4e1f0..6d4bc7917e 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2006-08-30 Joel Sherrill + + * libcsupport/src/utsname.c, libnetworking/libc/res_debug.c, + libnetworking/net/if_media.h, libnetworking/rtems/rtems_mii_ioctl.c, + librpc/src/rpc/svc_simple.c: Remove printf format warnings. + 2006-08-29 Joel Sherrill * libmisc/capture/capture-cli.c: Remove printf format warnings. diff --git a/cpukit/libcsupport/src/utsname.c b/cpukit/libcsupport/src/utsname.c index 6ba6c196c0..d97284b3be 100644 --- a/cpukit/libcsupport/src/utsname.c +++ b/cpukit/libcsupport/src/utsname.c @@ -41,7 +41,7 @@ int uname( strcpy( name->sysname, "RTEMS" ); - sprintf( name->nodename, "Node %" PRId32, _Objects_Local_node ); + sprintf( name->nodename, "Node %" PRId16, _Objects_Local_node ); strcpy( name->release, RTEMS_VERSION ); diff --git a/cpukit/libnetworking/libc/res_debug.c b/cpukit/libnetworking/libc/res_debug.c index 19fb9180c8..8d41fa818d 100644 --- a/cpukit/libnetworking/libc/res_debug.c +++ b/cpukit/libnetworking/libc/res_debug.c @@ -98,6 +98,8 @@ static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93"; static char rcsid[] = "$Id$"; #endif /* LIBC_SCCS and not lint */ +#include + #include #include #include @@ -532,7 +534,7 @@ p_time(u_int32_t value) { static char nbuf[40]; if (ns_format_ttl(value, nbuf, sizeof nbuf) < 0) - sprintf(nbuf, "%u", value); + sprintf(nbuf, "%" PRIu32, value); return (nbuf); } diff --git a/cpukit/libnetworking/net/if_media.h b/cpukit/libnetworking/net/if_media.h index e52c89c021..6d7f14b713 100644 --- a/cpukit/libnetworking/net/if_media.h +++ b/cpukit/libnetworking/net/if_media.h @@ -272,7 +272,7 @@ int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, * Macro to create a media word. */ #define IFM_MAKEWORD(type, subtype, options, instance) \ - ((type) | (subtype) | (options) | ((instance) << IFM_ISHIFT)) + ((type) | (subtype) | (options) | ((uint32_t)(instance) << IFM_ISHIFT)) #define IFM_MAKEMODE(mode) \ (((mode) << IFM_MSHIFT) & IFM_MMASK) diff --git a/cpukit/libnetworking/rtems/rtems_mii_ioctl.c b/cpukit/libnetworking/rtems/rtems_mii_ioctl.c index 5ee8186f05..fa6261459a 100644 --- a/cpukit/libnetworking/rtems/rtems_mii_ioctl.c +++ b/cpukit/libnetworking/rtems/rtems_mii_ioctl.c @@ -11,6 +11,7 @@ /* Author: Till Straumann, , 2005 */ #include +#include #undef _KERNEL #undef KERNEL @@ -61,8 +62,8 @@ rtems_ifmedia2str (int media, char *buf, int bufsz) dupdesc = IFM_FDX & media ? " full-duplex" : " half-duplex"; return WHATPRINT (buf, bufsz, - "Ethernet [phy instance: %i]: (link %s, autoneg %s) -- media: %s%s", - IFM_INST (media), + "Ethernet [phy instance: %" PRId32 "]: (link %s, autoneg %s) -- media: %s%s", + (int32_t) IFM_INST (media), IFM_LINK_OK & media ? "ok" : "down", IFM_ANEG_DIS & media ? "off" : "on", mdesc, dupdesc ? dupdesc : ""); diff --git a/cpukit/librpc/src/rpc/svc_simple.c b/cpukit/librpc/src/rpc/svc_simple.c index 1ad846981a..07dbd10fb5 100644 --- a/cpukit/librpc/src/rpc/svc_simple.c +++ b/cpukit/librpc/src/rpc/svc_simple.c @@ -49,6 +49,8 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/svc_simple.c,v 1.9 1999/08/28 0 #include #include +#include /* for PRIxx printf formats */ + struct prog_lst { char *(*p_progname)(); rpcprog_t p_prognum; @@ -142,7 +144,7 @@ universal( return; if (!svc_sendreply(atransp, lpl->p_outproc, outdata)) { (void) fprintf(stderr, - "trouble replying to prog %d\n", + "trouble replying to prog %" PRIu32 "\n", lpl->p_prognum); exit(1); } -- cgit v1.2.3