From 1fd9163cac65121e2d8f9fd4984f71dce068b891 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 19 Dec 2010 14:02:42 +0100 Subject: [PATCH] added typecast in mp_read_radix() warning was "warning: subscript has type `char'" --- bn_mp_read_radix.c | 2 +- pre_gen/mpi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bn_mp_read_radix.c b/bn_mp_read_radix.c index dc41065..18d301c 100644 --- a/bn_mp_read_radix.c +++ b/bn_mp_read_radix.c @@ -48,7 +48,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix) * this allows numbers like 1AB and 1ab to represent the same value * [e.g. in hex] */ - ch = (char) ((radix < 36) ? toupper (*str) : *str); + ch = (char) ((radix < 36) ? toupper ((int)*str) : *str); for (y = 0; y < 64; y++) { if (ch == mp_s_rmap[y]) { break; diff --git a/pre_gen/mpi.c b/pre_gen/mpi.c index 07091a2..c0f860c 100644 --- a/pre_gen/mpi.c +++ b/pre_gen/mpi.c @@ -6416,7 +6416,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix) * this allows numbers like 1AB and 1ab to represent the same value * [e.g. in hex] */ - ch = (char) ((radix < 36) ? toupper (*str) : *str); + ch = (char) ((radix < 36) ? toupper ((int)*str) : *str); for (y = 0; y < 64; y++) { if (ch == mp_s_rmap[y]) { break;