Fix warnings from gcc -pedantic.
[ircu2.10.12-pk.git] / ircd / ircd_reslib.c
index dac3b3e0652bb42e1fa55847705192296aee79f3..699a2d899d90343d7a187aba1900dcf2640e4bd8 100644 (file)
@@ -278,7 +278,7 @@ irc_ns_name_uncompress(const unsigned char *msg, const unsigned char *eom,
 
   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 @@ irc_ns_name_ntop(const char *src, char *dst, size_t dstsiz)
                        }
                        *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 @@ irc_encode_bitsring(const char **bp, const char *end, unsigned char **labelp,
   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 @@ irc_encode_bitsring(const char **bp, const char *end, unsigned char **labelp,
   **dst = blen;
 
   *bp = cp;
-  *dst = tp;
+  *dst = (unsigned char*)tp;
 
   return(0);
 }