]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix build warnings in libntlm
authorAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 29 Jul 2010 13:01:51 +0000 (07:01 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 29 Jul 2010 13:01:51 +0000 (07:01 -0600)
libntlmauth/ntlmauth.cc
libntlmauth/ntlmauth.h
libntlmauth/support_bits.cci

index 553e1c25e44f091218999677da00bae13e64c276..45aa7553c632f1304b8080252227cac0e157e108 100644 (file)
@@ -80,7 +80,7 @@ ntlm_dump_ntlmssp_flags(u_int32_t flags)
  * \retval NTLM_ERR_PROTOCOL  Packet is not the expected type.
  */
 int
-ntlm_validate_packet(const ntlmhdr * hdr, const int type)
+ntlm_validate_packet(const ntlmhdr * hdr, const int32_t type)
 {
     /*
      * Must be the correct security package and request type.
@@ -93,7 +93,7 @@ ntlm_validate_packet(const ntlmhdr * hdr, const int type)
     if (type == NTLM_ANY)
         return NTLM_ERR_NONE;
 
-    if (le32toh(hdr->type) != type) {
+    if ((int32_t)le32toh(hdr->type) != type) {
         /* don't report this error - it's ok as we do a if() around this function */
 //      fprintf(stderr, "ntlmCheckHeader: type is %d, wanted %d\n", le32toh(hdr->type), type);
         return NTLM_ERR_PROTOCOL;
index 93c62d7d35f4a6246e8dc057f9f26ea91f9b5994..73e616d7db6b0539d678880803efc5c5ce7cc9a1 100644 (file)
@@ -130,7 +130,7 @@ extern "C" {
     } ntlmhdr;
 
     /** Validate the packet type matches one we want. */
-    int ntlm_validate_packet(const ntlmhdr *packet, const int type);
+    int ntlm_validate_packet(const ntlmhdr *packet, const int32_t type);
 
     /** Retrieve a string from the NTLM packet payload. */
     lstring ntlm_fetch_string(const ntlmhdr *packet,
index b87cd7646cce9e35675ad7f181c745a8b7791b1a..52bf2fd410083df8ff4577a5e9ebb7394d127398 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 /* makes a null-terminated string upper-case. Changes CONTENTS! */
-static void
+inline void
 uc(char *string)
 {
     char *p = string, c;
@@ -23,7 +23,7 @@ uc(char *string)
 }
 
 /* makes a null-terminated string lower-case. Changes CONTENTS! */
-static void
+inline void
 lc(char *string)
 {
     char *p = string, c;
@@ -33,7 +33,7 @@ lc(char *string)
     }
 }
 
-static void
+inline void
 hex_dump(unsigned char *data, int size)
 {
     /* dumps size bytes of *data to stdout. Looks like: