changeset 906:794823108269

base64: Avoid comparison between signed and unsigned integers Flagged by gcc: # gcc --version gcc (Debian 4.8.1-8) 4.8.1 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # make ... base64.c: In function ‘base64_decode_clean’: base64.c:122:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = o = 0; o < out.len; i += 76, o += 78) {
author Simon Horman <horms@verge.net.au>
date Wed, 07 Aug 2013 14:13:27 +0900
parents c125055b1937
children cdf5ab1278e9
files perdition/base64.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/perdition/base64.c	Wed Aug 07 14:11:16 2013 +0900
+++ b/perdition/base64.c	Wed Aug 07 14:13:27 2013 +0900
@@ -99,7 +99,8 @@
 static struct buf base64_decode_clean(const struct const_buf *in)
 {
 	STRUCT_BUF(out);
-	int i, o;
+	int i;
+	size_t o;
 
 	/* As per RFC2045 the maximum encoded line length is 76,
 	 * the line separator is "\r\n" and