From: Christopher Peplin Date: Tue, 7 Jan 2014 05:07:11 +0000 (-0500) Subject: Enable warnings when compiling and fix a few. X-Git-Tag: 5.0.2~277^2~2 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=7f1d5473842361f97fef886bc4e98949ecf853b6;p=apps%2Fagl-service-can-low-level.git Enable warnings when compiling and fix a few. --- diff --git a/Makefile b/Makefile index d831b5ad..e93efb47 100644 --- 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 diff --git a/src/bitfield/8byte.c b/src/bitfield/8byte.c index 0ae6894b..9325ed1b 100644 --- a/src/bitfield/8byte.c +++ b/src/bitfield/8byte.c @@ -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, diff --git a/tests/8byte_tests.c b/tests/8byte_tests.c index 258b8805..64554acc 100644 --- a/tests/8byte_tests.c +++ b/tests/8byte_tests.c @@ -1,6 +1,7 @@ #include #include #include +#include START_TEST (test_large_bitmask) {