Trying to fix the issue of scanner not compiling on all platforms.
authorBrian Aker <brian@tangent.org>
Mon, 4 Apr 2011 22:05:47 +0000 (15:05 -0700)
committerBrian Aker <brian@tangent.org>
Mon, 4 Apr 2011 22:05:47 +0000 (15:05 -0700)
libmemcached/options/scanner.l

index c5b7962f11303fe9e7a415bc9c6c13e8affa1882..b53298ccdca54756e7339ed430c26cccc6c40c5c 100644 (file)
@@ -47,8 +47,8 @@
   } \
   else \
   { \
-    result= context->length - context->pos; \
-    result > max_size ? result = max_size : 0; \
+    result= (int)(context->length - context->pos); \
+    (size_t)result > (size_t)max_size ? result= max_size : 0; \
     memcpy(buffer, context->buf + context->pos, result); \
     context->pos += result; \
   } \