]> granicus.if.org Git - mutt/commitdiff
Fix a couple of possible compilation warnings. (Noted by "John C.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 1 Sep 1999 15:58:40 +0000 (15:58 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 1 Sep 1999 15:58:40 +0000 (15:58 +0000)
Place" <placej@ctcdist.com>.)

curs_lib.c
edit.c
hdrline.c
sendlib.c

index f9f50f68565f8dfeff91ce440147728bda142070..182f30bca9c19c1df476054d3c99ec413a6a18e4 100644 (file)
@@ -133,8 +133,8 @@ void mutt_edit_file (const char *editor, const char *data)
 int mutt_yesorno (const char *msg, int def)
 {
   event_t ch;
-  char *yes = _("yes");
-  char *no = _("no");
+  unsigned char *yes = (unsigned char *) _("yes");
+  unsigned char *no = (unsigned char *) _("no");
   
   CLEARLINE(LINES-1);
   printw("%s ([%c]/%c): ", msg, def ? *yes : *no,
@@ -161,7 +161,7 @@ int mutt_yesorno (const char *msg, int def)
       BEEP();
     }
   }
-  addstr (def ? yes : no);
+  addstr ((char *) (def ? yes : no));
   mutt_refresh ();
   return (def);
 }
diff --git a/edit.c b/edit.c
index de7b02543b4592fb68314cb0b9dac6be8361e982..9d471c963e8c33a08915fe5a98588ce2b484891f 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -96,7 +96,7 @@ be_snarf_file (const char *path, char **buf, int *max, int *len, int verbose)
     buf = be_snarf_data (f, buf, max, len, 0, sb.st_size, 0);
     if (verbose)
     {
-      snprintf(tmp, sizeof(tmp), "\"%s\" %d bytes\n", path, sb.st_size);
+      snprintf(tmp, sizeof(tmp), "\"%s\" %lu bytes\n", path, (unsigned long) sb.st_size);
       addstr(tmp);
     }
     fclose (f);
index 4c628182f27d94d57119d1d3325474b842b3d750..1a3e782dee809d38b641d50b888bb17477a0a16d 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -508,7 +508,7 @@ hdr_format_str (char *dest,
        else if (is_index && threads)
          snprintf (dest, destlen, buf2, " ");
        else
-         snprintf (dest, destlen, "");
+         *dest = '\0';
       }
       else
       {
index af530c2b6aaae5c14c67507f2c1824aa263dd234..f407757c20ec29ec504012efd92a98f5edd73d48 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -1174,7 +1174,7 @@ char *mutt_make_date (char *s, size_t len)
   snprintf (s, len,  "Date: %s, %d %s %d %02d:%02d:%02d %+03d%02d\n",
            Weekdays[l->tm_wday], l->tm_mday, Months[l->tm_mon],
            l->tm_year + 1900, l->tm_hour, l->tm_min, l->tm_sec,
-           tz / 60, abs (tz) % 60);
+           (int) tz / 60, (int) abs (tz) % 60);
   return (s);
 }