]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Makefle: force char to be signed
authorSage Weil <sage@inktank.com>
Thu, 16 May 2013 06:02:10 +0000 (23:02 -0700)
committerSage Weil <sage@inktank.com>
Thu, 16 May 2013 06:02:10 +0000 (23:02 -0700)
On an armv7l build, we see errors like

 warning: rgw/rgw_common.cc:626:16: comparison is always false due to limited range of data type [-Wtype-limits]

from code

      char c1 = hex_to_num(*src++);
...
      if (c1 < 0)

Force char to be signed (regardless of any weird architecture's default)
to avoid risk of this leading to misbehavior.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
src/Makefile.am

index cb8dbb810c2d09995e2f1edcd22979f21132e409..bbd38e618434c94cd3424958a89c4047cf30b501 100644 (file)
@@ -1144,7 +1144,8 @@ CLEANFILES += ceph_ver.h sample.fetch_config
 AM_COMMON_FLAGS = -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT \
 -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -rdynamic \
 ${WARN_TYPE_LIMITS} ${WARN_IGNORED_QUALIFIERS} -Winit-self -Wpointer-arith \
--fno-strict-aliasing
+-fno-strict-aliasing \
+-fsigned-char
 
 AM_CFLAGS = $(AM_COMMON_FLAGS)
 AM_CXXFLAGS = \