summaryrefslogtreecommitdiff
path: root/src/recoveryLoader.cpp
diff options
context:
space:
mode:
authorReinhold Gschweicher <pyro4hell@gmail.com>2022-03-20 22:45:24 +0100
committerAvamander <avamander@gmail.com>2022-04-24 19:07:46 +0300
commit129dd97b513e077ba15d6c3f5d7afce06664e0b4 (patch)
tree0d8fefc9e25e002de9037e6ea83a9193e17c4d90 /src/recoveryLoader.cpp
parent5a13c5215c5022f036947838975c5c16b9ab268c (diff)
SpiNorFlash: use C++ style struct in C++ only header
`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>
Diffstat (limited to 'src/recoveryLoader.cpp')
0 files changed, 0 insertions, 0 deletions