aboutsummaryrefslogtreecommitdiffstats
path: root/common/sexputil.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 /common/sexputil.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 'common/sexputil.c')
-rw-r--r--common/sexputil.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/sexputil.c b/common/sexputil.c
index 802916b44..8a27ad978 100644
--- a/common/sexputil.c
+++ b/common/sexputil.c
@@ -52,7 +52,7 @@ keygrip_from_canon_sexp (const unsigned char *key, size_t keylen,
if (!grip)
return gpg_error (GPG_ERR_INV_VALUE);
- err = gcry_sexp_sscan (&sexp, NULL, key, keylen);
+ err = gcry_sexp_sscan (&sexp, NULL, (const char *)key, keylen);
if (err)
return err;
if (!gcry_pk_get_keygrip (sexp, grip))
@@ -66,8 +66,11 @@ keygrip_from_canon_sexp (const unsigned char *key, size_t keylen,
are identical or !0 if they are not. Not that this function can't
be used for sorting. */
int
-cmp_simple_canon_sexp (const unsigned char *a, const unsigned char *b)
+cmp_simple_canon_sexp (const unsigned char *a_orig,
+ const unsigned char *b_orig)
{
+ const char *a = (const char *)a_orig;
+ const char *b = (const char *)b_orig;
unsigned long n1, n2;
char *endp;
@@ -124,7 +127,7 @@ make_simple_sexp_from_hexstr (const char *line, size_t *nscanned)
buf = xtrymalloc (strlen (numbuf) + len + 1 + 1);
if (!buf)
return NULL;
- p = stpcpy (buf, numbuf);
+ p = (unsigned char *)stpcpy ((char *)buf, numbuf);
s = line;
if ((n&1))
{