Skip to content

Commit da11f26

Browse files
pillo79soburi
authored andcommitted
warning cleanup: misc fixes
- Arduino_LED_Matrix: fix packed attribute placement, add missing dependency - Camera: fix pixel format check (formats are uint32_t, not pointers) - Ethernet: fix float division literals - SocketWrapper: hide deprecated warnings, fix signed/unsigned compare - Wire: hide pedantic 'invalid offsetof' warning
1 parent 20f7b9d commit da11f26

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

libraries/Wire/Wire.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010

1111
// Helper function to get ZephyrI2C instance from config pointer.
1212
static arduino::ZephyrI2C *getInstance(struct i2c_target_config *config) {
13+
#pragma GCC diagnostic push
14+
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
1315
return reinterpret_cast<arduino::ZephyrI2C *>(reinterpret_cast<char *>(config) -
1416
offsetof(arduino::ZephyrI2C, i2c_cfg));
17+
#pragma GCC diagnostic pop
1518
}
1619

1720
static int i2c_target_stop_cb(struct i2c_target_config *config) {

0 commit comments

Comments
 (0)