Change type to avoid integer promotion confusion.

The compiler promotes `uint8_t` to `int` when performing bitwise
operations, which then gets confusing when you assign to a `size_t`
variable.  Avoid the whole mess by using `unsigned` instead of
`uint8_t`.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/619ec102
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/619ec102
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/619ec102

Branch: refs/heads/master
Commit: 619ec102499b0f7cc98006ce0ba71dd7f098f879
Parents: 080c33a
Author: Marvin Humphrey <mar...@rectangular.com>
Authored: Tue May 3 19:17:49 2016 -0700
Committer: Marvin Humphrey <mar...@rectangular.com>
Committed: Wed May 4 19:21:36 2016 -0700

----------------------------------------------------------------------
 core/Lucy/Analysis/StandardTokenizer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/619ec102/core/Lucy/Analysis/StandardTokenizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/StandardTokenizer.c 
b/core/Lucy/Analysis/StandardTokenizer.c
index 429eff9..4a90700 100644
--- a/core/Lucy/Analysis/StandardTokenizer.c
+++ b/core/Lucy/Analysis/StandardTokenizer.c
@@ -278,7 +278,7 @@ word_break:
 
 static int
 S_wb_lookup(const char *ptr) {
-    uint8_t start = *(uint8_t*)ptr++;
+    unsigned start = *(uint8_t*)ptr++;
 
     if (start < 0x80) { return wb_ascii[start]; }
 

Reply via email to