From: Amos Jeffries Date: Thu, 29 Jul 2010 13:01:51 +0000 (-0600) Subject: Fix build warnings in libntlm X-Git-Tag: SQUID_3_2_0_1~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b13b5d03c0312f18088ddf14bcba8c0fa1f6719a;p=thirdparty%2Fsquid.git Fix build warnings in libntlm --- diff --git a/libntlmauth/ntlmauth.cc b/libntlmauth/ntlmauth.cc index 553e1c25e4..45aa7553c6 100644 --- a/libntlmauth/ntlmauth.cc +++ b/libntlmauth/ntlmauth.cc @@ -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; diff --git a/libntlmauth/ntlmauth.h b/libntlmauth/ntlmauth.h index 93c62d7d35..73e616d7db 100644 --- a/libntlmauth/ntlmauth.h +++ b/libntlmauth/ntlmauth.h @@ -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, diff --git a/libntlmauth/support_bits.cci b/libntlmauth/support_bits.cci index b87cd7646c..52bf2fd410 100644 --- a/libntlmauth/support_bits.cci +++ b/libntlmauth/support_bits.cci @@ -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: