diff --git a/arch/arm/src/tiva/hardware/tiva_ssi.h b/arch/arm/src/tiva/hardware/tiva_ssi.h index 90341fe6f1f..a6e3e29d7f8 100644 --- a/arch/arm/src/tiva/hardware/tiva_ssi.h +++ b/arch/arm/src/tiva/hardware/tiva_ssi.h @@ -234,7 +234,7 @@ # define SSI_DMACR_TXDMAE (1 << 1) /* Bit 1: Transmit DMA enable */ #endif -#if defined(CONFIG_ARCH_CHIP_LM) || defined(CONFIG_ARCH_CHIP_TIVA) */ +#if defined(CONFIG_ARCH_CHIP_LM) || defined(CONFIG_ARCH_CHIP_TIVA) /* SSI Peripheral Identification n (SSIPERIPHIDn), offset 0xfd0-0xfec */ # define SSI_PERIPHID_MASK 0xff /* Bits 7-0: SSI Peripheral ID n */ diff --git a/libs/libc/stdio/lib_libsscanf.c b/libs/libc/stdio/lib_libsscanf.c index 712a56964aa..7f486d91816 100644 --- a/libs/libc/stdio/lib_libsscanf.c +++ b/libs/libc/stdio/lib_libsscanf.c @@ -622,9 +622,9 @@ int lib_vsscanf(FAR struct lib_instream_s *obj, FAR int *lastc, int prefix; bool stopconv; int errsave; - unsigned long tmplong; + unsigned long tmplong = 0; #ifdef CONFIG_LIBC_LONG_LONG - unsigned long long tmplonglong; + unsigned long long tmplonglong = 0; #endif /* Copy the real string into a temporary working buffer. */ @@ -841,11 +841,13 @@ int lib_vsscanf(FAR struct lib_instream_s *obj, FAR int *lastc, switch (modifier) { +#ifndef CONFIG_LIBC_LONG_LONG + case LL_MOD: +#endif case HH_MOD: case H_MOD: case NO_MOD: default: - case L_MOD: if (sign) { tmplong = strtol(tmp, &endptr, base); @@ -881,7 +883,6 @@ int lib_vsscanf(FAR struct lib_instream_s *obj, FAR int *lastc, set_errno(errsave); if (!noassign) { - /* We have to check whether we need to return a long or * an int. */ @@ -903,8 +904,10 @@ int lib_vsscanf(FAR struct lib_instream_s *obj, FAR int *lastc, *pint = (unsigned int)tmplong; break; - default: +#ifndef CONFIG_LIBC_LONG_LONG case L_MOD: +#endif + default: linfo("Return %ld to 0x%p\n", tmplong, plong); *plong = tmplong; break;