Enable warnings when compiling and fix a few.
authorChristopher Peplin <chris.peplin@rhubarbtech.com>
Tue, 7 Jan 2014 05:07:11 +0000 (00:07 -0500)
committerChristopher Peplin <chris.peplin@rhubarbtech.com>
Tue, 7 Jan 2014 05:07:11 +0000 (00:07 -0500)
Makefile
src/bitfield/8byte.c
tests/8byte_tests.c

index d831b5a..e93efb4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 CC = gcc
 INCLUDES = -Isrc
-CFLAGS = $(INCLUDES) -c -w -Wall -Werror -g -ggdb -coverage
+CFLAGS = $(INCLUDES) -c -Wall -Werror -g -ggdb -coverage
 LDFLAGS = -coverage -lm
 LDLIBS = -lcheck
 
index 0ae6894..9325ed1 100644 (file)
@@ -8,8 +8,8 @@
 
 uint8_t eightbyte_get_nibble(const uint64_t source, const uint8_t nibble_index,
         const bool data_is_big_endian) {
-    return eightbyte_get_bitfield(source, NIBBLE_SIZE * nibble_index, NIBBLE_SIZE,
-            data_is_big_endian);
+    return (uint8_t) eightbyte_get_bitfield(source, NIBBLE_SIZE * nibble_index,
+            NIBBLE_SIZE, data_is_big_endian);
 }
 
 uint8_t eightbyte_get_byte(uint64_t source, const uint8_t byte_index,
index 258b880..64554ac 100644 (file)
@@ -1,6 +1,7 @@
 #include <check.h>
 #include <stdint.h>
 #include <bitfield/bitfield.h>
+#include <bitfield/8byte.h>
 
 START_TEST (test_large_bitmask)
 {