Skip to content

Commit

Permalink
Merge pull request #227 from xyan264/travis-warning-fix
Browse files Browse the repository at this point in the history
Fix Travis build warnings
  • Loading branch information
xyan264 authored Jun 24, 2020
2 parents c092284 + f041b25 commit c28545c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ sudo: required
matrix:
include:
- os: linux
env:
- MAKE_FLAGS="CFLAGS+=-Werror "

- os: linux
env:
- MATRIX_EVAL="CC=clang"
- MAKE_FLAGS="CFLAGS+=-Werror "

- os: linux
env:
- MATRIX_EVAL="CFLAGS=-m32 && LDFLAGS=-m32"
- MAKE_FLAGS="CFLAGS+=-Werror "

- os: linux
addons:
Expand All @@ -25,6 +29,7 @@ matrix:
env:
- CONFIG_OPTS="--host x86_64-w64-mingw32"
- MATRIX_EVAL="CC=x86_64-w64-mingw32-gcc"
- MAKE_FLAGS="CFLAGS+=-Werror "

- os: linux
addons:
Expand All @@ -35,14 +40,15 @@ matrix:
env:
- CONFIG_OPTS="--host i686-w64-mingw32"
- MATRIX_EVAL="CC=i686-w64-mingw32-gcc"
- MAKE_FLAGS="CFLAGS+=-Werror "

- os: linux
install:
- git clone https://git.kernel.org/pub/scm/devel/sparse/sparse.git --branch v0.5.2
- pushd sparse && make HAVE_LLVM=no && sudo make install HAVE_LLVM=no && popd
env:
- MATRIX_EVAL="CC=cgcc"
- MAKE_FLAGS="CFLAGS=-Wsparse-error CFLAGS+=-Wno-vla CFLAGS+=-Wno-old-initializer"
- MAKE_FLAGS="CFLAGS=-Wsparse-error CFLAGS+=-Wno-vla CFLAGS+=-Wno-old-initializer CFLAGS+=-Werror "

before_install:
- eval "${MATRIX_EVAL}"
Expand Down
1 change: 0 additions & 1 deletion lib/platform/linux-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ static ssize_t i2c_write_from_gas(struct switchtec_dev *dev, int fd,

// noop conversion functions to make macros below work
static inline uint8_t le8toh(uint8_t x) { return x; }
static inline uint8_t htole8(uint8_t x) { return x; }

#define create_gas_read(type, suffix) \
static type i2c_gas_read ## suffix(struct switchtec_dev *dev, \
Expand Down
2 changes: 1 addition & 1 deletion lib/switchtec.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ static int write_parsed_log(struct log_a_data log_data[],
unsigned int nanos, micros, millis, secs, mins, hours, days;
unsigned int entry_num;
unsigned int mod_id;
unsigned int log_sev;
unsigned int log_sev = 0;
const char *log_sev_strs[] = {"DISABLED", "HIGHEST", "HIGH", "MEDIUM",
"LOW", "LOWEST"};
bool is_bl1;
Expand Down

0 comments on commit c28545c

Please sign in to comment.