From: Ari Johnson Date: Mon, 3 Sep 2007 21:43:34 +0000 (+0000) Subject: Attempted fix of warnings when HAS_OPENSSL is not defined X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=9b33f5d2f0f3ba4592dbfe9ef2cf64c38dcfaaff;p=cobramush.git Attempted fix of warnings when HAS_OPENSSL is not defined --- diff --git a/src/funcrypt.c b/src/funcrypt.c index dfd5e10..f3e5d70 100644 --- a/src/funcrypt.c +++ b/src/funcrypt.c @@ -144,7 +144,7 @@ FUNCTION(fun_sha0) shsInit(&shsInfo); shsUpdate(&shsInfo, (const BYTE *) args[0], arglens[0]); shsFinal(&shsInfo); - safe_format(buff, bp, "%0lx%0lx%0lx%0lx%0lx", shsInfo.digest[0], + safe_format(buff, bp, "%0x%0x%0x%0x%0x", shsInfo.digest[0], shsInfo.digest[1], shsInfo.digest[2], shsInfo.digest[3], shsInfo.digest[4]); #endif @@ -178,7 +178,7 @@ FUNCTION(fun_digest) shsInit(&shsInfo); shsUpdate(&shsInfo, (const BYTE *) args[0], arglens[0]); shsFinal(&shsInfo); - safe_format(buff, bp, "%0lx%0lx%0lx%0lx%0lx", shsInfo.digest[0], + safe_format(buff, bp, "%0x%0x%0x%0x%0x", shsInfo.digest[0], shsInfo.digest[1], shsInfo.digest[2], shsInfo.digest[3], shsInfo.digest[4]); } else { diff --git a/src/mycrypt.c b/src/mycrypt.c index 43e202a..7e9e4d0 100644 --- a/src/mycrypt.c +++ b/src/mycrypt.c @@ -56,7 +56,7 @@ mush_crypt(const char *key) shsInit(&shsInfo); shsUpdate(&shsInfo, (const BYTE *) key, strlen(key)); shsFinal(&shsInfo); - sprintf(crypt_buff, "XX%lu%lu", shsInfo.digest[0], shsInfo.digest[1]); + sprintf(crypt_buff, "XX%u%u", shsInfo.digest[0], shsInfo.digest[1]); #endif return crypt_buff;