<<< Date Index >>>     <<< Thread Index >>>

Few warnings in cvs



Hi!

I'm new to mutt, just downloaded latest version from cvs and compiled it. 
Got these warnings:

account.c: In function 'mutt_account_match':
account.c:33: warning: unused variable 'login'

regex.c: In function 'regex_compile':
regex.c:2200: warning: comparison is always false due to limited range of data 
type
regex.c: In function 're_compile_fastmap':
regex.c:3121: warning: unused variable 'num_regs'

Following patch fixes them.

#v+
--- account.c~  2006-11-14 16:11:00.000000000 +0100
+++ account.c   2006-11-14 16:11:14.000000000 +0100
@@ -30,7 +30,9 @@
 int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* a2)
 {
   const char* user = NONULL (Username);
+#ifdef USE_IMAP
   const char* login = NONULL (Username);
+#endif

   if (a1->type != a2->type)
     return 0;
--- regex.c~    2006-11-14 16:11:59.000000000 +0100
+++ regex.c     2006-11-14 16:13:01.000000000 +0100
@@ -2196,8 +2196,7 @@
                     for (;;)
                       {
                         PATFETCH (c);
-                        if (c == ':' || c == ']' || p == pend
-                            || c1 == CHAR_CLASS_MAX_LENGTH)
+                        if (c == ':' || c == ']' || p == pend)
                           break;
                         str[c1++] = c;
                       }
@@ -3117,9 +3116,6 @@
 #ifndef REGEX_MALLOC
   char *destination;
 #endif
-  /* We don't push any register information onto the failure stack.  */
-  unsigned num_regs = 0;
-
   register char *fastmap = bufp->fastmap;
   unsigned char *pattern = bufp->buffer;
   unsigned char *p = pattern;
#v-

Regards.

-- 
Adam Wysocki, Warszawa, PL, GSM 514 710 213, http://www.chmurka.net/
GG 1234, Grono ID 123, FidoNet 2:480/138, QTH KO02MF, SWL SP5-250730