From 8c8751fa60b529d190ca85857096cf741b0436de Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 8 Oct 2008 15:56:47 +0000 Subject: Clean up warnings regarding printf. --- src/rc/rc-applets.c | 11 ++++++----- src/rc/runscript.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/rc') diff --git a/src/rc/rc-applets.c b/src/rc/rc-applets.c index f5892f98..eea4a01d 100644 --- a/src/rc/rc-applets.c +++ b/src/rc/rc-applets.c @@ -84,8 +84,8 @@ static int do_e(int argc, char **argv) int level = 0; struct timespec ts; struct timeval stop, now; - int (*e) (const char *, ...) __EINFO_PRINTF = NULL; - int (*ee) (int, const char *, ...) __EEND_PRINTF = NULL; + int (*e) (const char *, ...) EINFO_PRINTF(1, 2) = NULL; + int (*ee) (int, const char *, ...) EINFO_PRINTF(2, 3) = NULL; /* Punt applet */ argc--; @@ -205,9 +205,10 @@ static int do_e(int argc, char **argv) ee = eend; else if (strcmp(applet, "ewend") == 0) ee = ewend; - else if (strcmp(applet, "esyslog") == 0) - ee = elog; - else if (strcmp(applet, "veinfo") == 0) + else if (strcmp(applet, "esyslog") == 0) { + elog(retval, "%s", message); + retval = 0; + } else if (strcmp(applet, "veinfo") == 0) e = einfov; else if (strcmp(applet, "veinfon") == 0) e = einfovn; diff --git a/src/rc/runscript.c b/src/rc/runscript.c index 6dea2b2b..e263a4f4 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -557,7 +557,7 @@ static bool svc_wait(const char *svc) static RC_SERVICE svc_status(void) { char status[10]; - int (*e) (const char *fmt, ...) __EINFO_PRINTF = einfo; + int (*e) (const char *fmt, ...) EINFO_PRINTF(1, 2) = einfo; RC_SERVICE state = rc_service_state(service); if (state & RC_SERVICE_STOPPING) { -- cgit v1.2.3