Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Typo in neo430.h #10

Closed
DavidCussans opened this issue Jan 8, 2021 · 1 comment
Closed

Typo in neo430.h #10

DavidCussans opened this issue Jan 8, 2021 · 1 comment

Comments

@DavidCussans
Copy link

Building code that uses the unit64_u defined in neo430.h I get compiler warnings.

To me it looks like there is a typo in the definition of uint64_u

When I make the following change the compiler warning goes away....

diff --git a/sw/lib/neo430/include/neo430.h b/sw/lib/neo430/include/neo430.h
index 20b21bf..fe8dd49 100644
--- a/sw/lib/neo430/include/neo430.h
+++ b/sw/lib/neo430/include/neo430.h
@@ -44,11 +44,11 @@
 // ----------------------------------------------------------------------------
 union uint16_u { uint16_t uint16; uint8_t  uint8[ sizeof(uint16_t)/1]; };
 union uint32_u { uint32_t uint32; uint16_t uint16[sizeof(uint32_t)/2]; uint8_t  uint8[ sizeof(uint32_t)/1]; };
-union uint64_u { uint64_t uint64; uint32_t uint32[sizeof(uint64_t)/4];  uint16_t uint16[sizeof(uint64_t)/2]; uint8_t uint8[sizeof(uint32_t)/1]; };
+union uint64_u { uint64_t uint64; uint32_t uint32[sizeof(uint64_t)/4];  uint16_t uint16[sizeof(uint64_t)/2]; uint8_t uint8[sizeof(uint64_t)/1]; };
 
 union  int16_u { int16_t  int16; int8_t   int8[ sizeof(int16_t)/1]; };
 union  int32_u { int32_t  int32; int16_t  int16[sizeof(int32_t)/2]; int8_t  int8[ sizeof(int32_t)/1]; };
-union  int64_u { int64_t  int64; int32_t  int32[sizeof(int64_t)/4]; int16_t int16[sizeof(int64_t)/2]; int8_t int8[sizeof(int32_t)/1]; };
+union  int64_u { int64_t  int64; int32_t  int32[sizeof(int64_t)/4]; int16_t int16[sizeof(int64_t)/2]; int8_t int8[sizeof(int64_t)/1]; };
 
 
 // ----------------------------------------------------------------------------
@stnolting
Copy link
Owner

You are right, that is a typo. 👍

stnolting added a commit that referenced this issue Jan 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants