GCC 4 warning fixes.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 22 Apr 2005 14:04:48 +0000 (14:04 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 22 Apr 2005 14:04:48 +0000 (14:04 +0000)
configure.ad
lib/silcclient/client_attrs.c
lib/silcclient/silcclient.h
lib/silccore/silcmessage.c
lib/silccore/silcmessage.h

index 9ee80ef904c0a1a3d0f2696b83e8e8cd89c8eb68..b7affd6fd5e0548da9729d5ff96d46a9224554e7 100644 (file)
@@ -290,6 +290,7 @@ if test "$GCC"; then
     SILC_ADD_CFLAGS(-g -O2)
   fi
   SILC_ADD_CFLAGS(-Wall -finline-functions)
+  SILC_ADD_CFLAGS(-Wno-pointer-sign)
 else
   # Other compilers
   case "$target" in
index fc0821da6ee1268690ec88e29f023ca95909f932..eaf0a233818dc0158bb018fc94cc7182d83357cf 100644 (file)
@@ -218,10 +218,10 @@ bool silc_client_attribute_del(SilcClient client,
 
 /* Return all attributes */
 
-const SilcHashTable silc_client_attributes_get(SilcClient client,
-                                              SilcClientConnection conn)
+SilcHashTable silc_client_attributes_get(SilcClient client,
+                                        SilcClientConnection conn)
 {
-  return (const SilcHashTable)conn->internal->attrs;
+  return conn->internal->attrs;
 }
 
 /* Construct a Requested Attributes buffer. If the `attribute' is zero (0)
index a819389688367d837a29aa6e1aae473d964a72de..d68d6a6fa4479499814a70d0d8539ffe94c2daa6 100644 (file)
@@ -2800,8 +2800,8 @@ bool silc_client_attribute_del(SilcClient client,
  *    payload while traversing the table.
  *
  ***/
-const SilcHashTable silc_client_attributes_get(SilcClient client,
-                                              SilcClientConnection conn);
+SilcHashTable silc_client_attributes_get(SilcClient client,
+                                        SilcClientConnection conn);
 
 /****f* silcclient/SilcClientAPI/silc_client_attributes_request
  *
index 2876ab560e7517066df950002c736092f11e755d..32ab2e8344812feeb2e809c1f8a77ffeb96a57da 100644 (file)
@@ -423,10 +423,10 @@ unsigned char *silc_message_get_iv(SilcMessagePayload payload)
 
 /* Return signature of the message */
 
-const SilcMessageSignedPayload
+SilcMessageSignedPayload
 silc_message_get_signature(SilcMessagePayload payload)
 {
-  return (const SilcMessageSignedPayload)payload->sig;
+  return payload->sig;
 }
 
 /******************************************************************************
index 355d39b03193df003de1d184ff916115663fd8b6..32e40c93498ce3f8582ad6fb4acc5142ff0dd16d 100644 (file)
@@ -354,7 +354,8 @@ unsigned char *silc_message_get_iv(SilcMessagePayload payload);
  *    could not be retrieved from the message.
  *
  *    The caller SHOULD verify the signature by calling the
- *    silc_message_signed_verify function.
+ *    silc_message_signed_verify function.  Caller must not free the
+ *    returned payload pointer.
  *
  ***/
 SilcMessageSignedPayload