Fix cast for clang/clang++ in -c++17 mode, using a C-style cast so it's buildable by plain C users.
Add Makefile.clang Add regression test for Travis [#39]
This commit is contained in:
parent
a3b2262baf
commit
619625e4f0
|
@ -323,7 +323,7 @@ uint8_t i2c_reset(I2CDriver *sd)
|
|||
|
||||
int i2c_start(I2CDriver *sd, uint8_t dev, uint8_t op)
|
||||
{
|
||||
uint8_t start[2] = {'s', (dev << 1) | op};
|
||||
uint8_t start[2] = {'s', (uint8_t)((dev << 1) | op)};
|
||||
writeToSerialPort(sd->port, start, sizeof(start));
|
||||
return i2c_ack(sd);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
CC=clang
|
||||
CFLAGS += -I common -Wall -Wpointer-sign -xc++ -std=c++17 # -Werror
|
||||
|
||||
all: build/i2ccl
|
||||
|
||||
install: all
|
||||
cp build/i2ccl /usr/local/bin
|
||||
|
||||
build/i2ccl: linux/i2c.c common/i2cdriver.c
|
||||
mkdir -p build/
|
||||
$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $^
|
Loading…
Reference in New Issue