Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2004-07-22 01:04:12 UTC

Modified files:
     ircd/ircd_reslib.c ircd/ircd_crypt_smd5.c ircd/ircd_auth.c
     include/client.h ChangeLog

Log message:

Fix warnings from gcc -pedantic.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.434 ircu2.10/ChangeLog:1.435
--- ircu2.10/ChangeLog:1.434    Wed Jul 21 17:06:23 2004
+++ ircu2.10/ChangeLog  Wed Jul 21 18:04:02 2004
@@ -1,5 +1,10 @@
 2004-07-21  Michael Poole <[EMAIL PROTECTED]>
 
+       * include/client.h, ircd/ircd_auth.c, ircd/ircd_crypt_smd5.c,
+       ircd/ircd_reslib.c: Fix warnings from gcc -pedantic.
+
+2004-07-21  Michael Poole <[EMAIL PROTECTED]>
+
        New DNS resolver code, courtesy of Dianora and the rest of the
        Hybrid team.  (Bugs are of course my fault.)
 
Index: ircu2.10/include/client.h
diff -u ircu2.10/include/client.h:1.33 ircu2.10/include/client.h:1.34
--- ircu2.10/include/client.h:1.33      Wed Jul 21 17:06:23 2004
+++ ircu2.10/include/client.h   Wed Jul 21 18:04:02 2004
@@ -18,7 +18,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: client.h,v 1.33 2004/07/22 00:06:23 entrope Exp $
+ * $Id: client.h,v 1.34 2004/07/22 01:04:02 entrope Exp $
  */
 #ifndef INCLUDED_client_h
 #define INCLUDED_client_h
@@ -75,7 +75,7 @@
   struct name \
   { \
     unsigned long bits[((max + FLAGSET_NBITS - 1) / FLAGSET_NBITS)]; \
-  };
+  }
 
 #define FLAGSET_ISSET(set,flag) ((set).bits[FLAGSET_INDEX(flag)] & FLAGSET_MASK(flag))
 #define FLAGSET_SET(set, flag) (set).bits[FLAGSET_INDEX(flag)] |= FLAGSET_MASK(flag)
Index: ircu2.10/ircd/ircd_auth.c
diff -u ircu2.10/ircd/ircd_auth.c:1.2 ircu2.10/ircd/ircd_auth.c:1.3
--- ircu2.10/ircd/ircd_auth.c:1.2       Wed Jul 21 17:06:22 2004
+++ ircu2.10/ircd/ircd_auth.c   Wed Jul 21 18:04:01 2004
@@ -17,7 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  * 02111-1307, USA.
  *
- * $Id: ircd_auth.c,v 1.2 2004/07/22 00:06:22 entrope Exp $
+ * $Id: ircd_auth.c,v 1.3 2004/07/22 01:04:01 entrope Exp $
  */
 
 #include "config.h"
@@ -140,14 +140,20 @@
 
 struct IAuth *iauth_active;
 
-static const struct IAuthCmd iauth_cmdtab[];
-
 static void iauth_write(struct IAuth *iauth);
 static void iauth_reconnect(struct IAuth *iauth);
 static void iauth_disconnect(struct IAuth *iauth);
 static void iauth_sock_callback(struct Event *ev);
 static void iauth_send_request(struct IAuth *iauth, struct IAuthRequest *iar);
 static void iauth_dispose_request(struct IAuth *iauth, struct IAuthRequest *iar);
+static void iauth_cmd_doneauth(struct IAuth *iauth, int argc, char *argv[]);
+static void iauth_cmd_badauth(struct IAuth *iauth, int argc, char *argv[]);
+
+static const struct IAuthCmd iauth_cmdtab[] = {
+  { "DoneAuth", iauth_cmd_doneauth },
+  { "BadAuth", iauth_cmd_badauth },
+  { NULL, NULL }
+};
 
 struct IAuth *iauth_connect(char *host, unsigned short port, char *passwd, time_t 
reconnect, time_t timeout)
 {
@@ -688,9 +694,3 @@
   iauth_dispose_request(iauth, iar);
   exit_client(client, client, &me, reason);
 }
-
-static const struct IAuthCmd iauth_cmdtab[] = {
-  { "DoneAuth", iauth_cmd_doneauth },
-  { "BadAuth", iauth_cmd_badauth },
-  { NULL, NULL }
-};
Index: ircu2.10/ircd/ircd_crypt_smd5.c
diff -u ircu2.10/ircd/ircd_crypt_smd5.c:1.1 ircu2.10/ircd/ircd_crypt_smd5.c:1.2
--- ircu2.10/ircd/ircd_crypt_smd5.c:1.1 Mon Jun 14 18:20:36 2004
+++ ircu2.10/ircd/ircd_crypt_smd5.c     Wed Jul 21 18:04:01 2004
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd_crypt_smd5.c,v 1.1 2004/06/15 01:20:36 entrope Exp $
+ * $Id: ircd_crypt_smd5.c,v 1.2 2004/07/22 01:04:01 entrope Exp $
  */
 #include "config.h"
 #include "ircd_crypt.h"
@@ -116,9 +116,9 @@
   else
    MD5Name(MD5Update)(&ctx, (unsigned const char *)key+j, 1);
 
- /* Now make the output string */
-// strcpy(passwd, magic);
-// strncat(passwd, sp, sl);
+ /* Now make the output string
+ strcpy(passwd, magic);
+ strncat(passwd, sp, sl); */
  strncpy(passwd, sp, sl);
  strcat(passwd, "$");
 
Index: ircu2.10/ircd/ircd_reslib.c
diff -u ircu2.10/ircd/ircd_reslib.c:1.1 ircu2.10/ircd/ircd_reslib.c:1.2
--- ircu2.10/ircd/ircd_reslib.c:1.1     Wed Jul 21 17:06:22 2004
+++ ircu2.10/ircd/ircd_reslib.c Wed Jul 21 18:04:01 2004
@@ -98,7 +98,7 @@
 #define DNS_LABELTYPE_BITSTRING 0x41
 #define MAXLINE 128
 
-/* $Id: ircd_reslib.c,v 1.1 2004/07/22 00:06:22 entrope Exp $ */
+/* $Id: ircd_reslib.c,v 1.2 2004/07/22 01:04:01 entrope Exp $ */
 
 struct irc_ssaddr irc_nsaddr_list[IRCD_MAXNS];
 int irc_nscount = 0;
@@ -278,7 +278,7 @@
 
   if ((n = irc_ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
     return(-1);
-  if (irc_ns_name_ntop(tmp, dst, dstsiz) == -1)
+  if (irc_ns_name_ntop((char*)tmp, (char*)dst, dstsiz) == -1)
     return(-1);
   return(n);
 }
@@ -398,7 +398,7 @@
                        }
                        *dn++ = '.';
                }
-               if ((l = labellen(cp - 1)) < 0) {
+               if ((l = labellen((const unsigned char*)(cp - 1))) < 0) {
                        errno = EMSGSIZE; /* XXX */
                        return(-1);
                }
@@ -958,7 +958,7 @@
   if (!isxdigit((*cp) & 0xff)) /* reject '\[x/BLEN]' */
     return(EINVAL);
 
-  for (tp = *dst + 1; cp < end && tp < eom; cp++) {
+  for (tp = (char*)(*dst + 1); cp < end && tp < eom; cp++) {
     switch((c = *cp)) {
     case ']': /* end of the bitstring */
       if (afterslash) {
@@ -1035,7 +1035,7 @@
   **dst = blen;
 
   *bp = cp;
-  *dst = tp;
+  *dst = (unsigned char*)tp;
 
   return(0);
 }
----------------------- End of diff -----------------------

Reply via email to