aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2011-01-02 19:32:58 +0100
committerAndreas Schneider <asn@cynapses.org>2011-01-02 19:35:54 +0100
commitf23880ddee20cd2327d3e4b09f8b09d9880db1a8 (patch)
tree2da3108de2a8f2da2998996c0b503cd623dce7af
parentbe3e5c35cf40d58955147b7cdc27927352bb3e02 (diff)
downloadlibssh-f23880ddee20cd2327d3e4b09f8b09d9880db1a8.tar.gz
libssh-f23880ddee20cd2327d3e4b09f8b09d9880db1a8.tar.xz
libssh-f23880ddee20cd2327d3e4b09f8b09d9880db1a8.zip
base64: Added casts to GET macros to fix build warnings.
-rw-r--r--src/base64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/base64.c b/src/base64.c
index 262c97ca..ff7671c1 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -39,9 +39,9 @@ static char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define SET_C(n, i) do { (n) |= ((i) & 63) << 6; } while (0)
#define SET_D(n, i) do { (n) |= ((i) & 63); } while (0)
-#define GET_A(n) (((n) & 0xff0000) >> 16)
-#define GET_B(n) (((n) & 0xff00) >> 8)
-#define GET_C(n) ((n) & 0xff)
+#define GET_A(n) (unsigned char) (((n) & 0xff0000) >> 16)
+#define GET_B(n) (unsigned char) (((n) & 0xff00) >> 8)
+#define GET_C(n) (unsigned char) ((n) & 0xff)
static int _base64_to_bin(unsigned char dest[3], const char *source, int num);
static int get_equals(char *string);