129dd97b51
`SpiNorFlash.h` is a C++ header, but the `Identification` struct is created in a C style using `typedef struct`. Clang issues a warining about this discrepancy: ``` In file included from /home/nero/repos/pinetime/InfiniSim/InfiniTime/src/systemtask/SystemTask.cpp:13: /home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:16:21: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage] typedef struct __attribute__((packed)) { ^ Identification /home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:17:9: note: type is not C-compatible due to this default member initializer uint8_t manufacturer = 0; ^~~~~~~~~~~~~~~~~~~~ /home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:20:9: note: type is given name 'Identification' for linkage purposes by this typedef declaration } Identification; ^ 1 warning generated. ``` The easy fix is to use a C++ style struct. Also includes code style fix from Riksu9000 Co-authored-by: Riku Isokoski <riksu9000@gmail.com> |
||
---|---|---|
.. | ||
Bma421_C | ||
Bma421.cpp | ||
Bma421.h | ||
BufferProvider.h | ||
Cst816s.cpp | ||
Cst816s.h | ||
DebugPins.cpp | ||
DebugPins.h | ||
Hrs3300.cpp | ||
Hrs3300.h | ||
InternalFlash.cpp | ||
InternalFlash.h | ||
PinMap.h | ||
Spi.cpp | ||
Spi.h | ||
SpiMaster.cpp | ||
SpiMaster.h | ||
SpiNorFlash.cpp | ||
SpiNorFlash.h | ||
St7789.cpp | ||
St7789.h | ||
TwiMaster.cpp | ||
TwiMaster.h | ||
Watchdog.cpp | ||
Watchdog.h |