Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/libexec Pullup libexec string format fixes [is].



details:   https://anonhg.NetBSD.org/src/rev/e5894f79d378
branches:  netbsd-1-5
changeset: 489835:e5894f79d378
user:      tv <tv%NetBSD.org@localhost>
date:      Tue Oct 17 22:41:47 2000 +0000

description:
Pullup libexec string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.

diffstat:

 libexec/Makefile.inc            |   3 ++-
 libexec/ld.elf_so/rtld.h        |   5 +++--
 libexec/mail.local/mail.local.c |   7 ++++---
 libexec/rexecd/rexecd.c         |   7 ++++---
 libexec/rmail/rmail.c           |   7 ++++---
 libexec/rshd/rshd.c             |   7 ++++---
 libexec/telnetd/state.c         |  12 ++++++------
 libexec/telnetd/utility.c       |  12 ++++++------
 8 files changed, 33 insertions(+), 27 deletions(-)

diffs (223 lines):

diff -r e860dd4f6930 -r e5894f79d378 libexec/Makefile.inc
--- a/libexec/Makefile.inc      Tue Oct 17 22:33:54 2000 +0000
+++ b/libexec/Makefile.inc      Tue Oct 17 22:41:47 2000 +0000
@@ -1,5 +1,6 @@
-#      $NetBSD: Makefile.inc,v 1.4 1997/10/08 09:07:12 mrg Exp $
+#      $NetBSD: Makefile.inc,v 1.4.12.1 2000/10/17 22:41:47 tv Exp $
 #      @(#)Makefile.inc        8.1 (Berkeley) 6/4/93
 
 BINDIR?=       /usr/libexec
 WARNS?=                1
+WFORMAT?=      2
diff -r e860dd4f6930 -r e5894f79d378 libexec/ld.elf_so/rtld.h
--- a/libexec/ld.elf_so/rtld.h  Tue Oct 17 22:33:54 2000 +0000
+++ b/libexec/ld.elf_so/rtld.h  Tue Oct 17 22:41:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.h,v 1.25.4.1 2000/07/26 23:45:22 mycroft Exp $     */
+/*     $NetBSD: rtld.h,v 1.25.4.2 2000/10/17 22:41:48 tv Exp $  */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -236,7 +236,8 @@
 void _rtld_bind_start __P((void));
 
 /* rtld.c */
-void _rtld_error __P((const char *, ...));
+void _rtld_error __P((const char *, ...))
+     __attribute__((__format__(__printf__,1,2)));
 void _rtld_die __P((void));
 char *_rtld_dlerror __P((void));
 void *_rtld_dlopen __P((const char *, int));
diff -r e860dd4f6930 -r e5894f79d378 libexec/mail.local/mail.local.c
--- a/libexec/mail.local/mail.local.c   Tue Oct 17 22:33:54 2000 +0000
+++ b/libexec/mail.local/mail.local.c   Tue Oct 17 22:41:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mail.local.c,v 1.16 1998/08/10 02:57:23 perry Exp $    */
+/*     $NetBSD: mail.local.c,v 1.16.10.1 2000/10/17 22:41:49 tv Exp $  */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)mail.local.c       8.22 (Berkeley) 6/21/95";
 #else
-__RCSID("$NetBSD: mail.local.c,v 1.16 1998/08/10 02:57:23 perry Exp $");
+__RCSID("$NetBSD: mail.local.c,v 1.16.10.1 2000/10/17 22:41:49 tv Exp $");
 #endif
 #endif /* not lint */
 
@@ -67,7 +67,8 @@
 #define        NOTFATAL        0
 
 int    deliver __P((int, char *, int));
-void   err __P((int, const char *, ...));
+void   err __P((int, const char *, ...))
+     __attribute__((__format__(__printf__, 2, 3)));
 void   notifybiff __P((char *));
 int    store __P((const char *));
 void   usage __P((void));
diff -r e860dd4f6930 -r e5894f79d378 libexec/rexecd/rexecd.c
--- a/libexec/rexecd/rexecd.c   Tue Oct 17 22:33:54 2000 +0000
+++ b/libexec/rexecd/rexecd.c   Tue Oct 17 22:41:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rexecd.c,v 1.6 1998/07/26 19:49:03 mycroft Exp $       */
+/*     $NetBSD: rexecd.c,v 1.6.10.1 2000/10/17 22:41:49 tv Exp $       */
 
 /*
  * Copyright (c) 1983, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "from: @(#)rexecd.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: rexecd.c,v 1.6 1998/07/26 19:49:03 mycroft Exp $");
+__RCSID("$NetBSD: rexecd.c,v 1.6.10.1 2000/10/17 22:41:49 tv Exp $");
 #endif
 #endif /* not lint */
 
@@ -64,7 +64,8 @@
 #include <string.h>
 #include <unistd.h>
 
-void error __P((const char *, ...));
+void error __P((const char *, ...))
+     __attribute__((__format__(__printf__, 1, 2)));
 int main __P((int, char **));
 void doit __P((int, struct sockaddr_in *));
 void getstr __P((char *, int, char *));
diff -r e860dd4f6930 -r e5894f79d378 libexec/rmail/rmail.c
--- a/libexec/rmail/rmail.c     Tue Oct 17 22:33:54 2000 +0000
+++ b/libexec/rmail/rmail.c     Tue Oct 17 22:41:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rmail.c,v 1.13 1999/01/11 22:40:00 kleink Exp $        */
+/*     $NetBSD: rmail.c,v 1.13.10.1 2000/10/17 22:41:49 tv Exp $       */
 
 /*
  * Copyright (c) 1988, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)rmail.c    8.3 (Berkeley) 5/15/95";
 #else
-__RCSID("$NetBSD: rmail.c,v 1.13 1999/01/11 22:40:00 kleink Exp $");
+__RCSID("$NetBSD: rmail.c,v 1.13.10.1 2000/10/17 22:41:49 tv Exp $");
 #endif
 #endif /* not lint */
 
@@ -86,7 +86,8 @@
 # define MAX(a, b)     ((a) < (b) ? (b) : (a))
 #endif
 
-void err __P((int, const char *, ...));
+void err __P((int, const char *, ...))
+     __attribute((__format__(__printf__, 2, 3)));
 void usage __P((void));
 int main __P((int, char *[]));
 
diff -r e860dd4f6930 -r e5894f79d378 libexec/rshd/rshd.c
--- a/libexec/rshd/rshd.c       Tue Oct 17 22:33:54 2000 +0000
+++ b/libexec/rshd/rshd.c       Tue Oct 17 22:41:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rshd.c,v 1.19 2000/04/14 12:28:51 itojun Exp $ */
+/*     $NetBSD: rshd.c,v 1.19.4.1 2000/10/17 22:41:49 tv Exp $ */
 
 /*
  * Copyright (C) 1998 WIDE Project.
@@ -73,7 +73,7 @@
 #if 0
 static char sccsid[] = "@(#)rshd.c     8.2 (Berkeley) 4/6/94";
 #else
-__RCSID("$NetBSD: rshd.c,v 1.19 2000/04/14 12:28:51 itojun Exp $");
+__RCSID("$NetBSD: rshd.c,v 1.19.4.1 2000/10/17 22:41:49 tv Exp $");
 #endif
 #endif /* not lint */
 
@@ -114,7 +114,8 @@
 int    sent_null;
 
 void    doit __P((struct sockaddr *));
-void    error __P((const char *, ...));
+void    error __P((const char *, ...))
+     __attribute__((__format__(__printf__, 1, 2)));
 void    getstr __P((char *, int, char *));
 int     local_domain __P((char *));
 char   *topdomain __P((char *));
diff -r e860dd4f6930 -r e5894f79d378 libexec/telnetd/state.c
--- a/libexec/telnetd/state.c   Tue Oct 17 22:33:54 2000 +0000
+++ b/libexec/telnetd/state.c   Tue Oct 17 22:41:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: state.c,v 1.11.12.1 2000/06/22 07:09:04 thorpej Exp $  */
+/*     $NetBSD: state.c,v 1.11.12.2 2000/10/17 22:41:50 tv Exp $       */
 
 /*
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)state.c    8.5 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: state.c,v 1.11.12.1 2000/06/22 07:09:04 thorpej Exp $");
+__RCSID("$NetBSD: state.c,v 1.11.12.2 2000/10/17 22:41:50 tv Exp $");
 #endif
 #endif /* not lint */
 
@@ -53,10 +53,10 @@
 
 static int envvarok __P((char *));
 
-unsigned char  doopt[] = { IAC, DO, '%', 'c', 0 };
-unsigned char  dont[] = { IAC, DONT, '%', 'c', 0 };
-unsigned char  will[] = { IAC, WILL, '%', 'c', 0 };
-unsigned char  wont[] = { IAC, WONT, '%', 'c', 0 };
+unsigned const char    doopt[] = { IAC, DO, '%', 'c', 0 };
+unsigned const char    dont[] = { IAC, DONT, '%', 'c', 0 };
+unsigned const char    will[] = { IAC, WILL, '%', 'c', 0 };
+unsigned const char    wont[] = { IAC, WONT, '%', 'c', 0 };
 int    not42 = 1;
 
 /*
diff -r e860dd4f6930 -r e5894f79d378 libexec/telnetd/utility.c
--- a/libexec/telnetd/utility.c Tue Oct 17 22:33:54 2000 +0000
+++ b/libexec/telnetd/utility.c Tue Oct 17 22:41:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: utility.c,v 1.13.4.1 2000/06/22 07:09:05 thorpej Exp $ */
+/*     $NetBSD: utility.c,v 1.13.4.2 2000/10/17 22:41:50 tv Exp $      */
 
 /*
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)utility.c  8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: utility.c,v 1.13.4.1 2000/06/22 07:09:05 thorpej Exp $");
+__RCSID("$NetBSD: utility.c,v 1.13.4.2 2000/10/17 22:41:50 tv Exp $");
 #endif
 #endif /* not lint */
 
@@ -953,25 +953,25 @@
                    for (i = 2; i < length; i++ ) {
                        switch (pointer[i]) {
                        case NEW_ENV_VAR:
-                           sprintf(nfrontp, "\" VAR " + noquote);
+                           sprintf(nfrontp, "%s", "\" VAR " + noquote);
                            nfrontp += strlen(nfrontp);
                            noquote = 2;
                            break;
 
                        case NEW_ENV_VALUE:
-                           sprintf(nfrontp, "\" VALUE " + noquote);
+                           sprintf(nfrontp, "%s", "\" VALUE " + noquote);
                            nfrontp += strlen(nfrontp);
                            noquote = 2;
                            break;
 
                        case ENV_ESC:
-                           sprintf(nfrontp, "\" ESC " + noquote);
+                           sprintf(nfrontp, "%s", "\" ESC " + noquote);
                            nfrontp += strlen(nfrontp);
                            noquote = 2;
                            break;
 
                        case ENV_USERVAR:
-                           sprintf(nfrontp, "\" USERVAR " + noquote);
+                           sprintf(nfrontp, "%s", "\" USERVAR " + noquote);
                            nfrontp += strlen(nfrontp);
                            noquote = 2;
                            break;



Home | Main Index | Thread Index | Old Index