From: Christopher Peplin Date: Sat, 4 Jan 2014 16:32:15 +0000 (-0500) Subject: Build with GNU89 standard for greater compatibility. X-Git-Tag: 3.99.1~105^2~8 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=28e30830755758d13458c05ebe2a8db5dc9f43a0;p=apps%2Flow-level-can-service.git Build with GNU89 standard for greater compatibility. --- diff --git a/Makefile b/Makefile index 89fbf25..d831b5a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CC = gcc INCLUDES = -Isrc -CFLAGS = $(INCLUDES) -c -w -Wall -Werror -g -ggdb -std=gnu99 -coverage +CFLAGS = $(INCLUDES) -c -w -Wall -Werror -g -ggdb -coverage LDFLAGS = -coverage -lm LDLIBS = -lcheck diff --git a/src/bitfield/8byte.c b/src/bitfield/8byte.c index 5f31042..72f7e32 100644 --- a/src/bitfield/8byte.c +++ b/src/bitfield/8byte.c @@ -36,7 +36,8 @@ uint64_t eightbyte_get_bitfield(uint64_t source, const uint16_t offset, uint64_t ret = bytes[startByte]; if(startByte != endByte) { // The lowest byte address contains the most significant bit. - for(uint8_t i = startByte + 1; i <= endByte; i++) { + uint8_t i; + for(i = startByte + 1; i <= endByte; i++) { ret = ret << 8; ret = ret | bytes[i]; }