summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Gohad <tushar.gohad@intel.com>2015-04-30 13:37:57 -0700
committerTushar Gohad <tushar.gohad@intel.com>2015-04-30 13:43:23 -0700
commit18276412fd7780623ae4222a7c14ce65f04a7ebf (patch)
treebc0cc444716a79e40bfe679c66a4c5b664a11c08
parent5afed811936994cee54f923e5d69174bd14a5bb7 (diff)
downloadliberasurecode-18276412fd7780623ae4222a7c14ce65f04a7ebf.tar.gz
Fix a uint < 0 warning reported by Clang
Also add -Wall for future builds
-rw-r--r--Makefile.am2
-rw-r--r--test/libec_slap.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 4191beb..f442ecf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,7 +10,7 @@ INCLUDE = -I$(abs_top_builddir)/include \
-I$(abs_top_builddir)/include/xor_codes
AM_CPPFLAGS = $(CPPFLAGS) $(INCLUDE)
-AM_CPPFLAGS += -Werror
+AM_CPPFLAGS += -Werror -Wall
AM_CFLAGS = -fPIC $(AM_CPPFLAGS) @GCOV_FLAGS@ -L/usr/local/lib
diff --git a/test/libec_slap.c b/test/libec_slap.c
index 0f3c24b..ac69ee4 100644
--- a/test/libec_slap.c
+++ b/test/libec_slap.c
@@ -52,7 +52,7 @@ struct frag_array_set {
void print_mask(unsigned long mask)
{
unsigned int i = 0;
- unsigned long pos = 1;
+ long pos = 1;
if (mask == 0) {
fprintf(stderr," No Missing fragments");
@@ -69,7 +69,7 @@ void print_mask(unsigned long mask)
void missing_mask_to_array(long mask, int *missing)
{
unsigned int i = 0;
- unsigned long pos = 1;
+ long pos = 1;
for (i = 0; i < (sizeof(size_t) * 8) - 1; i++) {
if ((mask & (pos << i)) != 0) {
@@ -78,7 +78,7 @@ void missing_mask_to_array(long mask, int *missing)
}
}
-size_t add_item_to_missing_mask(unsigned long mask, unsigned int pos)
+size_t add_item_to_missing_mask(unsigned long mask, long pos)
{
if (pos < 0) {
return mask;