From: Joel Reicher Date: Fri, 14 Apr 2006 07:54:26 +0000 (+0000) Subject: Get rid of some trivial warnings; unused variables, ambiguous if-else, X-Git-Tag: nmh-1_3_RC1~38 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=8c1b8e55ba6269af3f6be282eeb7b5a19516315f;p=mmh Get rid of some trivial warnings; unused variables, ambiguous if-else, missing headers. --- diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 8475d50..b212b12 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -359,11 +359,12 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat) case FT_NUM: n = snprintf(cp, ep - cp + 1, "%d", value); - if (n >= 0) + if (n >= 0) { if (n >= ep - cp) { cp = ep; } else cp += n; + } break; case FT_NUMF: cpnumber (&cp, value, fmt->f_width, fmt->f_fill, ep - cp); diff --git a/sbr/m_draft.c b/sbr/m_draft.c index b0168e2..d3e988e 100644 --- a/sbr/m_draft.c +++ b/sbr/m_draft.c @@ -10,6 +10,7 @@ */ #include +#include #include @@ -18,7 +19,6 @@ m_draft (char *folder, char *msg, int use, int *isdf) { register char *cp; register struct msgs *mp; - struct stat st; static char buffer[BUFSIZ]; if (*isdf == -1 || folder == NULL || *folder == '\0') { diff --git a/uip/folder.c b/uip/folder.c index b332af0..98c66ed 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -135,7 +135,6 @@ main (int argc, char **argv) int pushsw = 0, popsw = 0; char *cp, *dp, *msg = NULL, *argfolder = NULL; char **ap, **argp, buf[BUFSIZ], **arguments; - struct stat st; #ifdef LOCALE setlocale(LC_ALL, ""); diff --git a/uip/inc.c b/uip/inc.c index 0731a15..aee194a 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -29,6 +29,7 @@ #endif #include +#include #include #ifdef POP diff --git a/uip/refile.c b/uip/refile.c index acafbf4..e77fe0b 100644 --- a/uip/refile.c +++ b/uip/refile.c @@ -278,11 +278,9 @@ main (int argc, char **argv) static void opnfolds (struct st_fold *folders, int nfolders) { - register char *cp; char nmaildir[BUFSIZ]; register struct st_fold *fp, *ep; register struct msgs *mp; - struct stat st; for (fp = folders, ep = folders + nfolders; fp < ep; fp++) { chdir (m_maildir (""));