Skip to content

Commit

Permalink
Merge pull request #711 from adafruit/add-Werror=return-type
Browse files Browse the repository at this point in the history
add -Werror=return-type for all warning options
  • Loading branch information
hathach committed Jan 6, 2022
2 parents c20491b + 82130a2 commit bf2cff4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libraries/SPI/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void SPIClass::transfer(const void *tx_buf, void *rx_buf, size_t count)
while (count)
{
// each transfer can only up to 64KB (16-bit) bytes
const size_t xfer_len = min(count, UINT16_MAX);
const size_t xfer_len = min(count, (size_t) UINT16_MAX);

nrfx_spim_xfer_desc_t xfer_desc =
{
Expand Down
10 changes: 5 additions & 5 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ version=1.2.0
# Compile variables
# -----------------

compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith
compiler.warning_flags=-Werror=return-type
compiler.warning_flags.none=-Werror=return-type
compiler.warning_flags.default=-Werror=return-type
compiler.warning_flags.more=-Wall -Werror=return-type
compiler.warning_flags.all=-Wall -Wextra -Werror=return-type -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith

# Allow changing optimization settings via platform.local.txt / boards.local.txt
compiler.optimization_flag=-Ofast
Expand Down

0 comments on commit bf2cff4

Please sign in to comment.