Skip to content

Commit

Permalink
logging: Add compile time error on 64 bit platforms
Browse files Browse the repository at this point in the history
Logger is designed with assumption that address fit in 32 bits.
Added explicit compilation error on 64 bit platforms.

Signed-off-by: Krzysztof Chruscinski <[email protected]>
  • Loading branch information
nordic-krch committed Nov 6, 2018
1 parent 7a602fc commit 91d8d52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/logging/log_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
extern "C" {
#endif

#if UINTPTR_MAX == 0xFFFFFFFFFFFFFFFFUL
#error "Logger does not support 64 bit architecture."
#endif

#if !CONFIG_LOG
#define CONFIG_LOG_DEFAULT_LEVEL 0
#define CONFIG_LOG_DOMAIN_ID 0
Expand Down

0 comments on commit 91d8d52

Please sign in to comment.