Skip to content

Commit b8d3290

Browse files
committed
Merge branch 'dups'
2 parents b45496a + 9684aba commit b8d3290

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ string(APPEND CMAKE_C_FLAGS " -Wno-cast-function-type")
320320
# Hardening
321321
string(APPEND CMAKE_C_FLAGS " -fstack-protector-all")
322322

323+
# Disallow duplicate definitions, which is the default since GCC
324+
# 10. It was not default in gcc-arm-none-eabi-8-2018-q4.
325+
string(APPEND CMAKE_C_FLAGS " -fno-common")
326+
323327
# For `struct timespec` and `strdup`
324328
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600")
325329

src/i2c_ecc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@
1919
#include "util.h"
2020
#include <string.h>
2121

22-
struct i2c_m_sync_desc I2C_0;
23-
2422
uint8_t i2c_ecc_read(uint8_t* rxdata, uint32_t rxlen)
2523
{
2624
struct _i2c_m_msg packet;
2725
uint8_t retries = I2C_ECC_RETRIES;
2826
int32_t r;
2927

3028
packet.addr = I2C_ECC_ADDR >> 1;
31-
packet.len = rxlen;
29+
packet.len = (int32_t)rxlen;
3230
packet.buffer = rxdata;
3331
packet.flags = I2C_M_SEVEN | I2C_M_RD | I2C_M_STOP;
3432

@@ -47,7 +45,7 @@ uint8_t i2c_ecc_write(uint8_t* txdata, uint32_t txlen)
4745
int32_t r;
4846

4947
packet.addr = I2C_ECC_ADDR >> 1;
50-
packet.len = txlen;
48+
packet.len = (int32_t)txlen;
5149
packet.buffer = txdata;
5250
packet.flags = I2C_M_SEVEN | I2C_M_STOP;
5351

src/random.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
#include "util.h"
2626
#include <wally_crypto.h>
2727

28-
#ifndef TESTING
29-
struct rand_sync_desc RAND_0;
30-
#endif
31-
3228
void random_32_bytes_mcu(uint8_t* buf)
3329
{
3430
if (buf == NULL) {

0 commit comments

Comments
 (0)