lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] svn commit: r1308431 - /lucy/trunk/core/Lucy/Analysis/StandardTokenizer.c
Date Mon, 02 Apr 2012 17:05:41 GMT
Author: nwellnhof
Date: Mon Apr  2 17:05:41 2012
New Revision: 1308431

URL: http://svn.apache.org/viewvc?rev=1308431&view=rev
Log:
Fix some clang warnings

Modified:
    lucy/trunk/core/Lucy/Analysis/StandardTokenizer.c

Modified: lucy/trunk/core/Lucy/Analysis/StandardTokenizer.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Analysis/StandardTokenizer.c?rev=1308431&r1=1308430&r2=1308431&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Analysis/StandardTokenizer.c (original)
+++ lucy/trunk/core/Lucy/Analysis/StandardTokenizer.c Mon Apr  2 17:05:41 2012
@@ -104,9 +104,9 @@ StandardTokenizer_transform_text(Standar
 void
 StandardTokenizer_tokenize_str(StandardTokenizer *self, const char *text,
                                size_t len, Inversion *inversion) {
-    if (len >= 1 && (uint8_t)text[len - 1] >= 0xC0
-        ||  len >= 2 && (uint8_t)text[len - 2] >= 0xE0
-        ||  len >= 3 && (uint8_t)text[len - 3] >= 0xF0) {
+    if ((len >= 1 && (uint8_t)text[len - 1] >= 0xC0)
+        ||  (len >= 2 && (uint8_t)text[len - 2] >= 0xE0)
+        ||  (len >= 3 && (uint8_t)text[len - 3] >= 0xF0)) {
         THROW(ERR, "Invalid UTF-8 sequence");
     }
 
@@ -185,8 +185,8 @@ S_parse_word(const char *text, size_t le
             case WB_MidNumLet:
             case WB_MidLetter:
             case WB_MidNum:
-                if (state == WB_ALetter && wb != WB_MidNum
-                    ||  state == WB_Numeric && wb != WB_MidLetter) {
+                if ((state == WB_ALetter && wb != WB_MidNum)
+                    ||  (state == WB_Numeric && wb != WB_MidLetter)) {
                     wb = S_skip_extend_format(text, len, iter);
                     if (wb == state) { break; }
                 }



Mime
View raw message