Merge in more updates for docs (we are just going to check them all in so that users...
[awesomized/libmemcached] / libmemcached / options / scanner.l
index c5b7962f11303fe9e7a415bc9c6c13e8affa1882..8f3e09deed146f58bf6895b35bdbb7044772f84c 100644 (file)
@@ -21,6 +21,7 @@
 %top{
 
 #pragma GCC diagnostic ignored "-Wold-style-cast"
+#pragma GCC diagnostic ignored "-Wsign-compare"
 #pragma GCC diagnostic ignored "-Wunused-parameter"
 
 #include <libmemcached/options/context.h>
@@ -47,8 +48,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; \
   } \