[sheepdog] [PATCH] fix compiler warning in object_cache.c

Liu Yuan namei.unix at gmail.com
Thu Aug 22 09:00:25 CEST 2013


On Thu, Aug 22, 2013 at 02:19:36PM +0800, Robin Dong wrote:
> When building sheepdog it reports warning message like:
> 
> 	object_cache.c: In function ‘object_cache_flush_and_delete’:
> 	object_cache.c:1039: warning: comparison is always false due to limited range of data type
> 	object_cache.c: In function ‘load_cache_object’:
> 	object_cache.c:1252: warning: comparison is always false due to limited range of data type
> 	object_cache.c: In function ‘load_cache’:
> 	object_cache.c:1290: warning: comparison is always false due to limited range of data type
> 
> The 'idx' is the result of strtoul and it should be 'unsgiend long' instead of 'uint32_t' and
> it can't reach ULLONG_MAX but ULONG_MAX.

Applied thanks

Yuan



More information about the sheepdog mailing list