Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Mar 2014 13:23:52 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262655 - head/lib/libiconv_modules/VIQR
Message-ID:  <201403011323.s21DNqoM077260@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Sat Mar  1 13:23:52 2014
New Revision: 262655
URL: http://svnweb.freebsd.org/changeset/base/262655

Log:
  Silence the gcc warning about unsigned comparison with 0 in a different
  way because mnemonic_ext_size isn't a preprocessor macro.
  
  MFC after:	3 days

Modified:
  head/lib/libiconv_modules/VIQR/citrus_viqr.c

Modified: head/lib/libiconv_modules/VIQR/citrus_viqr.c
==============================================================================
--- head/lib/libiconv_modules/VIQR/citrus_viqr.c	Sat Mar  1 13:00:40 2014	(r262654)
+++ head/lib/libiconv_modules/VIQR/citrus_viqr.c	Sat Mar  1 13:23:52 2014	(r262655)
@@ -456,8 +456,8 @@ _citrus_VIQR_encoding_module_init(_VIQRE
 			return (errnum);
 		}
 	}
-#if mnemonic_ext_size > 0
-	for (i = 0; i < mnemonic_ext_size; ++i) {
+	/* a + 1 < b + 1 here to silence gcc warning about unsigned < 0. */
+	for (i = 0; i + 1 < mnemonic_ext_size + 1; ++i) {
 		const mnemonic_def_t *p;
 
 		p = &mnemonic_ext[i];
@@ -471,7 +471,6 @@ _citrus_VIQR_encoding_module_init(_VIQRE
 			return (errnum);
 		}
 	}
-#endif
 
 	return (0);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403011323.s21DNqoM077260>