diff --git a/graphics/tiff/tiff_initialize.c b/graphics/tiff/tiff_initialize.c index 2d6f66a50..7cd1f66f8 100644 --- a/graphics/tiff/tiff_initialize.c +++ b/graphics/tiff/tiff_initialize.c @@ -450,7 +450,7 @@ static int tiff_datetime(FAR char *timbuf, unsigned int buflen) int tiff_initialize(FAR struct tiff_info_s *info) { uint16_t val16; -#if CONFIG_DEBUG_TIFFOFFSETS +#ifdef CONFIG_DEBUG_TIFFOFFSETS off_t offset = 0; #endif char timbuf[TIFF_DATETIME_STRLEN + 8]; diff --git a/nshlib/nsh_command.c b/nshlib/nsh_command.c index 315983522..855ebb09d 100644 --- a/nshlib/nsh_command.c +++ b/nshlib/nsh_command.c @@ -411,7 +411,7 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifndef CONFIG_NSH_DISABLE_UNAME -#if CONFIG_NET +#ifdef CONFIG_NET { "uname", cmd_uname, 1, 7, "[-a | -imnoprsv]" }, #else { "uname", cmd_uname, 1, 7, "[-a | -imoprsv]" }, diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c index 0874046eb..d672ee937 100644 --- a/nshlib/nsh_syscmds.c +++ b/nshlib/nsh_syscmds.c @@ -255,7 +255,7 @@ int cmd_uname(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) set |= UNAME_KERNEL; break; -#if CONFIG_NET +#ifdef CONFIG_NET case 'n': set |= UNAME_NODE; break; @@ -332,7 +332,7 @@ int cmd_uname(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) str = info.sysname; break; -#if CONFIG_NET +#ifdef CONFIG_NET case 1: /* Print noname */ str = info.nodename; break; diff --git a/platform/mikroe-stm32f4/mikroe_configdata.c b/platform/mikroe-stm32f4/mikroe_configdata.c index 91c444175..601b16ed9 100644 --- a/platform/mikroe-stm32f4/mikroe_configdata.c +++ b/platform/mikroe-stm32f4/mikroe_configdata.c @@ -111,7 +111,7 @@ int platform_setconfig(enum config_data_e id, int instance, #ifdef CONFIG_MIKROE_STM32F4_CONFIGDATA_FS FILE* fd; #endif -#if CONFIG_MIKROE_STM32F4_CONFIGDATA_PART +#ifdef CONFIG_MIKROE_STM32F4_CONFIGDATA_PART struct config_data_s config; int ret; int fd; @@ -166,7 +166,7 @@ int platform_setconfig(enum config_data_e id, int instance, fclose(fd); return OK; -#elif CONFIG_MIKROE_STM32F4_CONFIGDATA_ROM +#elif defined(CONFIG_MIKROE_STM32F4_CONFIGDATA_ROM) /* We are reading from a read-only system, so nothing to do. */ @@ -224,13 +224,13 @@ int platform_getconfig(enum config_data_e id, int instance, size_t bytes; enum config_data_e saved_id; int saved_instance; -#elif CONFIG_MIKROE_STM32F4_CONFIGDATA_ROM +#elif defined(CONFIG_MIKROE_STM32F4_CONFIGDATA_ROM) static const uint8_t touch_cal_data[] = { 0x9a, 0x2f, 0x00, 0x00, 0x40, 0xbc, 0x69, 0xfe, 0x70, 0x2e, 0x00, 0x00, 0xb8, 0x2d, 0xdb, 0xff }; #endif -#if CONFIG_MIKROE_STM32F4_CONFIGDATA_PART +#ifdef CONFIG_MIKROE_STM32F4_CONFIGDATA_PART struct config_data_s config; int ret; int fd; @@ -298,7 +298,7 @@ int platform_getconfig(enum config_data_e id, int instance, return OK; -#elif CONFIG_MIKROE_STM32F4_CONFIGDATA_ROM +#elif defined(CONFIG_MIKROE_STM32F4_CONFIGDATA_ROM) memcpy(configdata, touch_cal_data, datalen); return OK; diff --git a/system/composite/composite_main.c b/system/composite/composite_main.c index 2c9b0ed12..4d5122ef0 100644 --- a/system/composite/composite_main.c +++ b/system/composite/composite_main.c @@ -751,7 +751,7 @@ int conn_main(int argc, char *argv[]) check_test_memory_usage("After composite_initialize()"); -#if CONFIG_USBDEV_TRACE && CONFIG_USBDEV_TRACE_INITIALIDSET != 0 +#if defined(CONFIG_USBDEV_TRACE) && CONFIG_USBDEV_TRACE_INITIALIDSET != 0 /* If USB tracing is enabled and tracing of initial USB events is specified, * then dump all collected trace data to stdout */ diff --git a/system/hex2bin/hex2bin.c b/system/hex2bin/hex2bin.c index 46d4fc583..5bbe89d5f 100644 --- a/system/hex2bin/hex2bin.c +++ b/system/hex2bin/hex2bin.c @@ -299,7 +299,7 @@ static int readstream(FAR struct lib_instream_s *instream, *line = '\0'; return nbytes; } -#elif CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_EITHER_CRLF) if (ch == '\n' || ch == '\r') { *line = '\0'; diff --git a/system/readline/readline_common.c b/system/readline/readline_common.c index 82a7610ad..42499ac3a 100644 --- a/system/readline/readline_common.c +++ b/system/readline/readline_common.c @@ -598,7 +598,7 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf, int buflen) else if (ch == '\n') #elif defined(CONFIG_EOL_IS_CR) else if (ch == '\r') -#elif CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_EITHER_CRLF) else if (ch == '\n' || ch == '\r') #endif {