Skip to content

Commit

Permalink
Disable uncrustify indentation check for macros that use windows `__p…
Browse files Browse the repository at this point in the history
…ragma` (#164)

* Disable uncrustify indentation check for deeply indented macros

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Update TODO note to reflect the whole uncrustify situation

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
  • Loading branch information
emersonknapp authored and jacobperron committed Jun 19, 2019
1 parent e49e277 commit 7350a3b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/rcutils/stdatomic_helper/win32/stdatomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ typedef _Atomic (uintmax_t) atomic_uintmax_t;
* 7.17.7 Operations on atomic types. (pruned modified for Windows' crappy C compiler)
*/

// TODO(emersonknapp) Regression in uncrustify breaks formatting for macros with __pragma
// remove indent-off when we have fix for https://github.com/uncrustify/uncrustify/issues/2314
// *INDENT-OFF*

#define rcutils_win32_atomic_compare_exchange_strong(object, out, expected, desired) \
__pragma(warning(push)) \
__pragma(warning(disable: 4244)) \
Expand Down Expand Up @@ -398,6 +402,8 @@ typedef _Atomic (uintmax_t) atomic_uintmax_t;
} while (0); \
__pragma(warning(pop))

// *INDENT-ON*

#define rcutils_win32_atomic_store(object, desired) \
do { \
MemoryBarrier(); \
Expand Down

0 comments on commit 7350a3b

Please sign in to comment.