Revision: 1096 Author: christian.egli@xxxxxxxxxxxxxx Date: Mon Jan 6 13:37:00 2014 UTC Log: Fix warnings with gcc 4.8.2 - Two unused variables that I just removed.- Changed two variables of type typeforms to int since they're used as bitfields. - The loop counter in the utf8 decoding couldn't go below 0, but the compiler
couldn't prove that. I think the change from >= to > in the termination condition is correct since the byte has to be >= 0x80 in this case so thefinial iteration isn't necessary (if it would be, the compiler would be right
and we'd actually have an array out of bounds). Thanks to Peter Nilsson Lundblad for the patch. http://code.google.com/p/liblouis/source/detail?r=1096 Modified: /trunk/AUTHORS /trunk/ChangeLog /trunk/NEWS /trunk/liblouis/compileTranslationTable.c /trunk/liblouis/lou_translateString.c /trunk/liblouis/wrappers.c ======================================= --- /trunk/AUTHORS Mon Jan 6 12:42:57 2014 UTC +++ /trunk/AUTHORS Mon Jan 6 13:37:00 2014 UTC @@ -61,3 +61,5 @@ Ken Perry <kperry@xxxxxxx> Jožef Gregorc <jozko.gregorc@xxxxxxxxx> + +Peter Nilsson Lundblad <plundblad@xxxxxxxxxx> ======================================= --- /trunk/ChangeLog Fri Jul 19 11:28:38 2013 UTC +++ /trunk/ChangeLog Mon Jan 6 13:37:00 2014 UTC @@ -1,3 +1,17 @@ +2014-01-06 Peter Nilsson Lundblad <plundblad@xxxxxxxxxx> + + * liblouis/wrappers.c: Two unused variables that I just removed. + + * liblouis/lou_translateString.c: Changed two variables of type + typeforms to int since they're used as bitfields. + * liblouis/compileTranslationTable.c (parseChars): The loop + counter in the utf8 decoding couldn't go below 0, but the compiler + couldn't prove that. I think the change from >= to > in the + termination condition is correct since the byte has to be >= 0x80 + in this case so the finial iteration isn't necessary (if it would + be, the compiler would be right and we'd actually have an array + out of bounds). + 2013-07-19 Patrick Zajda <patrick@xxxxxxxx> * tables/fr-bfu-comp8.utb: corrections. ======================================= --- /trunk/NEWS Mon Jan 6 12:42:57 2014 UTC +++ /trunk/NEWS Mon Jan 6 13:37:00 2014 UTC @@ -10,6 +10,7 @@ number and strings such as 5-inch-diameter and 25-year-old-man should now back-translate correctly. Thanks to John Boyer. - Fixed a problem with syllable opcode. Thanks to John Boyer. + - Fix warnings with gcc 4.8.2. Thanks to Peter Lundblad. ** Braille Table Improvements - fr-bfu-comp8.utb: corrections, zero was wrongly displayed in some ======================================= --- /trunk/liblouis/compileTranslationTable.c Mon Aug 5 12:09:31 2013 UTC +++ /trunk/liblouis/compileTranslationTable.c Mon Jan 6 13:37:00 2014 UTC @@ -1592,7 +1592,7 @@ } lastOutSize = out; lastIn = in; - for (numBytes = MAXBYTES - 1; numBytes >= 0; numBytes--) + for (numBytes = MAXBYTES - 1; numBytes > 0; numBytes--) if (ch >= first0Bit[numBytes]) break; utf32 = ch & (0XFF - first0Bit[numBytes]); ======================================= --- /trunk/liblouis/lou_translateString.c Thu Oct 31 10:38:55 2013 UTC +++ /trunk/liblouis/lou_translateString.c Mon Jan 6 13:37:00 2014 UTC @@ -563,8 +563,8 @@ return 1; } -static typeforms prevType = plain_text; -static typeforms curType = plain_text; +static int prevType = plain_text; +static int curType = plain_text; typedef enum { ======================================= --- /trunk/liblouis/wrappers.c Wed Oct 23 15:12:24 2013 UTC +++ /trunk/liblouis/wrappers.c Mon Jan 6 13:37:00 2014 UTC @@ -86,10 +86,9 @@ *inputPos, int *cursorPos, int mode) { char transSpec[MAXSTRING]; - char *afterColon; int action; strcpy (transSpec, trantab); - afterColon = findColon (transSpec); + findColon (transSpec); action = findAction (translators, transSpec); switch (action) { @@ -117,10 +116,9 @@ *inputPos, int *cursorPos, int mode) { char transSpec[MAXSTRING]; - char *afterColon; int action; strcpy (transSpec, trantab); - afterColon = findColon (transSpec); + findColon (transSpec); action = findAction (translators, transSpec); switch (action) {