Warning fixes from Christos Zoulas
- shadowed variables - signed/unsigned confusion - const lossage - incomplete structure initializations - unused code
This commit is contained in:
@@ -109,8 +109,12 @@ static const unsigned char ntlmsigature[8] = "NTLMSSP\x00";
|
||||
|
||||
#define CHECK(f, e) \
|
||||
do { \
|
||||
ret = f ; if (ret != (e)) { ret = HNTLM_ERR_DECODE; goto out; } } \
|
||||
while(0)
|
||||
ret = f; \
|
||||
if (ret != (ssize_t)(e)) { \
|
||||
ret = HNTLM_ERR_DECODE; \
|
||||
goto out; \
|
||||
} \
|
||||
} while(/*CONSTCOND*/0)
|
||||
|
||||
static struct units ntlm_flag_units[] = {
|
||||
#define ntlm_flag(x) { #x, NTLM_##x }
|
||||
@@ -1399,7 +1403,7 @@ static time_t
|
||||
nt2unixtime(uint64_t t)
|
||||
{
|
||||
t = ((t - (uint64_t)NTTIME_EPOCH) / (uint64_t)10000000);
|
||||
if (t > (((time_t)(~(uint64_t)0)) >> 1))
|
||||
if (t > (((uint64_t)(time_t)(~(uint64_t)0)) >> 1))
|
||||
return 0;
|
||||
return (time_t)t;
|
||||
}
|
||||
|
Reference in New Issue
Block a user