From: levitte@gmail.com Date: Sun, 13 Sep 2009 09:55:14 +0000 (+0000) Subject: Include ctype.h to get declaration of tolower.h and friends. X-Git-Tag: yubikey-personalisation_1.0-1~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff19cddb92fe224e2b04293a9ab1e928d6538d7d;p=yubikey-personalization.old Include ctype.h to get declaration of tolower.h and friends. Fix gcc warnings. git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@193 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- diff --git a/ykpers.c b/ykpers.c index 7e11a3e..497abd7 100644 --- a/ykpers.c +++ b/ykpers.c @@ -37,6 +37,7 @@ #include #include #include +#include #include @@ -127,7 +128,6 @@ int ykp_configure_for(YKP_CONFIG *cfg, int confnum, YK_STATUS *st) int ykp_AES_key_from_hex(YKP_CONFIG *cfg, const char *hexkey) { char aesbin[256]; - unsigned long int aeslong; /* Make sure that the hexkey is exactly 32 characters */ if (strlen(hexkey) != 32) { @@ -372,7 +372,7 @@ int ykp_write_config(const YKP_CONFIG *cfg, writer(str_modhex_prefix, strlen(str_key_value_separator), userdata); - yubikey_modhex_encode(buffer, cfg->ykcore_config.fixed, cfg->ykcore_config.fixedSize); + yubikey_modhex_encode(buffer, (char *)cfg->ykcore_config.fixed, cfg->ykcore_config.fixedSize); writer(buffer, strlen(buffer), userdata); writer("\n", 1, userdata); @@ -383,7 +383,7 @@ int ykp_write_config(const YKP_CONFIG *cfg, writer(str_hex_prefix, strlen(str_key_value_separator), userdata); - yubikey_hex_encode(buffer, cfg->ykcore_config.uid, UID_SIZE); + yubikey_hex_encode(buffer, (char *)cfg->ykcore_config.uid, UID_SIZE); writer(buffer, strlen(buffer), userdata); writer("\n", 1, userdata); @@ -394,7 +394,7 @@ int ykp_write_config(const YKP_CONFIG *cfg, writer(str_hex_prefix, strlen(str_key_value_separator), userdata); - yubikey_hex_encode(buffer, cfg->ykcore_config.key, KEY_SIZE); + yubikey_hex_encode(buffer, (char *)cfg->ykcore_config.key, KEY_SIZE); writer(buffer, strlen(buffer), userdata); writer("\n", 1, userdata); @@ -405,7 +405,7 @@ int ykp_write_config(const YKP_CONFIG *cfg, writer(str_hex_prefix, strlen(str_key_value_separator), userdata); - yubikey_hex_encode(buffer, cfg->ykcore_config.accCode, ACC_CODE_SIZE); + yubikey_hex_encode(buffer, (char *)cfg->ykcore_config.accCode, ACC_CODE_SIZE); writer(buffer, strlen(buffer), userdata); writer("\n", 1, userdata);