aboutsummaryrefslogtreecommitdiffstats
path: root/sm/keydb.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2005-06-16 08:12:03 +0000
committerWerner Koch <[email protected]>2005-06-16 08:12:03 +0000
commitdeeba405a9a5868ea478db5003be6335ab9aac6f (patch)
treed61d720258fd571ec81a3d3e5d776320b7b1d796 /sm/keydb.c
parentNew debugging optionhs, updates to the manual. (diff)
downloadgnupg-deeba405a9a5868ea478db5003be6335ab9aac6f.tar.gz
gnupg-deeba405a9a5868ea478db5003be6335ab9aac6f.zip
gcc-4 defaults forced me to edit many many files to get rid of the
char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
Diffstat (limited to 'sm/keydb.c')
-rw-r--r--sm/keydb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sm/keydb.c b/sm/keydb.c
index 293e5233d..17f04fe4b 100644
--- a/sm/keydb.c
+++ b/sm/keydb.c
@@ -681,7 +681,7 @@ keydb_insert_cert (KEYDB_HANDLE hd, ksba_cert_t cert)
{
int rc = -1;
int idx;
- char digest[20];
+ unsigned char digest[20];
if (!hd)
return gpg_error (GPG_ERR_INV_VALUE);
@@ -723,7 +723,7 @@ int
keydb_update_cert (KEYDB_HANDLE hd, ksba_cert_t cert)
{
int rc = 0;
- char digest[20];
+ unsigned char digest[20];
if (!hd)
return gpg_error (GPG_ERR_INV_VALUE);
@@ -1010,8 +1010,9 @@ keydb_search_subject (KEYDB_HANDLE hd, const char *name)
static int
-hextobyte (const unsigned char *s)
+hextobyte (const char *string)
{
+ const unsigned char *s = (const unsigned char *)string;
int c;
if( *s >= '0' && *s <= '9' )
@@ -1122,7 +1123,7 @@ classify_user_id (const char *name,
if (!strchr("01234567890abcdefABCDEF", *si))
return 0; /* invalid digit in serial number*/
}
- desc->sn = s;
+ desc->sn = (const unsigned char*)s;
desc->snlen = -1;
if (!*si)
mode = KEYDB_SEARCH_MODE_SN;