Set pp_ignore_define_body=false in uncrustify config.
Need to work around a bug that produces closed brace errors, see https://github.com/uncrustify/uncrustify/issues/2569
This commit is contained in:
@@ -341,6 +341,3 @@ pp_space = force # ignore/add/remove/force
|
|||||||
|
|
||||||
# Sets the number of spaces per level added with pp_space.
|
# Sets the number of spaces per level added with pp_space.
|
||||||
pp_space_count = 1 # unsigned number
|
pp_space_count = 1 # unsigned number
|
||||||
|
|
||||||
# Whether to ignore the '#define' body while formatting.
|
|
||||||
pp_ignore_define_body = true # true/false
|
|
||||||
|
@@ -2917,7 +2917,7 @@ pp_if_indent_code = false # true/false
|
|||||||
pp_define_at_level = false # true/false
|
pp_define_at_level = false # true/false
|
||||||
|
|
||||||
# Whether to ignore the '#define' body while formatting.
|
# Whether to ignore the '#define' body while formatting.
|
||||||
pp_ignore_define_body = true # true/false
|
pp_ignore_define_body = false # true/false
|
||||||
|
|
||||||
# Whether to indent case statements between #if, #else, and #endif.
|
# Whether to indent case statements between #if, #else, and #endif.
|
||||||
# Only applies to the indent of the preprocesser that the case statements
|
# Only applies to the indent of the preprocesser that the case statements
|
||||||
|
@@ -75,8 +75,9 @@ char ** create_str_array(size_t count, ...);
|
|||||||
printf("FAILED: deitialization of testcase %s at %s:%d\n", #testcase, __FILE__, __LINE__); \
|
printf("FAILED: deitialization of testcase %s at %s:%d\n", #testcase, __FILE__, __LINE__); \
|
||||||
success = 0; \
|
success = 0; \
|
||||||
} \
|
} \
|
||||||
if (!success) \
|
if (!success) { \
|
||||||
errors++; \
|
errors++; \
|
||||||
|
} \
|
||||||
} while(false)
|
} while(false)
|
||||||
|
|
||||||
#define VERIFY_PRINT_MSG(fmt, actual_str, actual, expected_str, expected, expected_to_be_message) \
|
#define VERIFY_PRINT_MSG(fmt, actual_str, actual, expected_str, expected, expected_to_be_message) \
|
||||||
|
@@ -860,13 +860,15 @@ env_update_didvar(const char *ep, unsigned int *didvar)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_PUTENV(a, b, c) do { \
|
#define CHECK_PUTENV(a, b, c) do { \
|
||||||
if (sudo_putenv((a), (b), (c)) == -1) \
|
if (sudo_putenv((a), (b), (c)) == -1) { \
|
||||||
goto bad; \
|
goto bad; \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define CHECK_SETENV2(a, b, c, d) do { \
|
#define CHECK_SETENV2(a, b, c, d) do { \
|
||||||
if (sudo_setenv2((a), (b), (c), (d)) == -1) \
|
if (sudo_setenv2((a), (b), (c), (d)) == -1) { \
|
||||||
goto bad; \
|
goto bad; \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -21,39 +21,46 @@
|
|||||||
|
|
||||||
/* Macros for checking strlcpy/strlcat/sudo_ldap_value_cat return value. */
|
/* Macros for checking strlcpy/strlcat/sudo_ldap_value_cat return value. */
|
||||||
#define CHECK_STRLCPY(d, s, l) do { \
|
#define CHECK_STRLCPY(d, s, l) do { \
|
||||||
if (strlcpy((d), (s), (l)) >= (l)) \
|
if (strlcpy((d), (s), (l)) >= (l)) { \
|
||||||
goto overflow; \
|
goto overflow; \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define CHECK_STRLCAT(d, s, l) do { \
|
#define CHECK_STRLCAT(d, s, l) do { \
|
||||||
if (strlcat((d), (s), (l)) >= (l)) \
|
if (strlcat((d), (s), (l)) >= (l)) { \
|
||||||
goto overflow; \
|
goto overflow; \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define CHECK_LDAP_VCAT(d, s, l) do { \
|
#define CHECK_LDAP_VCAT(d, s, l) do { \
|
||||||
if (sudo_ldap_value_cat((d), (s), (l)) >= (l)) \
|
if (sudo_ldap_value_cat((d), (s), (l)) >= (l)) { \
|
||||||
goto overflow; \
|
goto overflow; \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#if defined(__GNUC__) && __GNUC__ == 2
|
#if defined(__GNUC__) && __GNUC__ == 2
|
||||||
# define DPRINTF1(fmt...) do { \
|
# define DPRINTF1(fmt...) do { \
|
||||||
sudo_debug_printf(SUDO_DEBUG_DIAG, fmt); \
|
sudo_debug_printf(SUDO_DEBUG_DIAG, fmt); \
|
||||||
if (ldap_conf.debug >= 1) \
|
if (ldap_conf.debug >= 1) { \
|
||||||
sudo_warnx_nodebug(fmt); \
|
sudo_warnx_nodebug(fmt); \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
# define DPRINTF2(fmt...) do { \
|
# define DPRINTF2(fmt...) do { \
|
||||||
sudo_debug_printf(SUDO_DEBUG_INFO, fmt); \
|
sudo_debug_printf(SUDO_DEBUG_INFO, fmt); \
|
||||||
if (ldap_conf.debug >= 2) \
|
if (ldap_conf.debug >= 2) { \
|
||||||
sudo_warnx_nodebug(fmt); \
|
sudo_warnx_nodebug(fmt); \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#else
|
||||||
# define DPRINTF1(...) do { \
|
# define DPRINTF1(...) do { \
|
||||||
sudo_debug_printf(SUDO_DEBUG_DIAG, __VA_ARGS__); \
|
sudo_debug_printf(SUDO_DEBUG_DIAG, __VA_ARGS__); \
|
||||||
if (ldap_conf.debug >= 1) \
|
if (ldap_conf.debug >= 1) { \
|
||||||
sudo_warnx_nodebug(__VA_ARGS__); \
|
sudo_warnx_nodebug(__VA_ARGS__); \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
# define DPRINTF2(...) do { \
|
# define DPRINTF2(...) do { \
|
||||||
sudo_debug_printf(SUDO_DEBUG_INFO, __VA_ARGS__); \
|
sudo_debug_printf(SUDO_DEBUG_INFO, __VA_ARGS__); \
|
||||||
if (ldap_conf.debug >= 2) \
|
if (ldap_conf.debug >= 2) { \
|
||||||
sudo_warnx_nodebug(__VA_ARGS__); \
|
sudo_warnx_nodebug(__VA_ARGS__); \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user