]> granicus.if.org Git - mutt/commitdiff
Fix some minor warnings
authorBrendan Cully <brendan@kublai.com>
Mon, 23 May 2011 05:13:45 +0000 (22:13 -0700)
committerBrendan Cully <brendan@kublai.com>
Mon, 23 May 2011 05:13:45 +0000 (22:13 -0700)
keymap.c
mbox.c

index 92b651b61d5d5cb444888ec67d7f2ea2626099a0..d82310a7b038cfa0f0caeba1cb0d61ff112bef48 100644 (file)
--- a/keymap.c
+++ b/keymap.c
@@ -167,16 +167,17 @@ static int parse_fkey(char *s)
  */
 static int parse_keycode (const char *s)
 {
-    const char *endChar;
-    long int result = strtol(s+1, &endChar, 8);
-    /* allow trailing whitespace, eg.  < 1001 > */
-    while (ISSPACE(*endChar))
-       ++endChar;
-    /* negative keycodes don't make sense, also detect overflow */
-    if (*endChar != '>' || result < 0 || result == LONG_MAX) {
-       return -1;
-    }
-    return result;
+  char *endChar;
+  long int result = strtol(s+1, &endChar, 8);
+  /* allow trailing whitespace, eg.  < 1001 > */
+  while (ISSPACE(*endChar))
+    ++endChar;
+  /* negative keycodes don't make sense, also detect overflow */
+  if (*endChar != '>' || result < 0 || result == LONG_MAX) {
+    return -1;
+  }
+
+  return result;
 }
 
 static int parsekeys (const char *str, keycode_t *d, int max)
@@ -689,7 +690,7 @@ void init_extended_keys(void)
 
       if (keyname)
       {
-       char *s = tigetstr(keyname);
+        char *s = tigetstr((char *)keyname);
        if (s && (long)(s) != -1)
        {
          int code = key_defined(s);
diff --git a/mbox.c b/mbox.c
index 6437621fd14e678722b77a84b55b18a2dca757ff..2af4dd22a0be8972925e65ce817efffaede7e8d9 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -690,7 +690,6 @@ static int mbox_has_new(CONTEXT *ctx)
 void mbox_reset_atime (CONTEXT *ctx, struct stat *st)
 {
   struct utimbuf utimebuf;
-  int i;
   struct stat _st;
 
   if (!st)