arch/arm/src/tiva/hardware/tiva_ssi.h: Fix typo error found in build testing. libs/libc/stdio/lib_libsscanf.c: Fix warnings found in build testing.

This commit is contained in:
Gregory Nutt
2019-02-15 14:38:06 -06:00
parent 4dc0636f1e
commit d0bd4c959d
2 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -234,7 +234,7 @@
# define SSI_DMACR_TXDMAE (1 << 1) /* Bit 1: Transmit DMA enable */ # define SSI_DMACR_TXDMAE (1 << 1) /* Bit 1: Transmit DMA enable */
#endif #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 */ /* SSI Peripheral Identification n (SSIPERIPHIDn), offset 0xfd0-0xfec */
# define SSI_PERIPHID_MASK 0xff /* Bits 7-0: SSI Peripheral ID n */ # define SSI_PERIPHID_MASK 0xff /* Bits 7-0: SSI Peripheral ID n */
+8 -5
View File
@@ -622,9 +622,9 @@ int lib_vsscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
int prefix; int prefix;
bool stopconv; bool stopconv;
int errsave; int errsave;
unsigned long tmplong; unsigned long tmplong = 0;
#ifdef CONFIG_LIBC_LONG_LONG #ifdef CONFIG_LIBC_LONG_LONG
unsigned long long tmplonglong; unsigned long long tmplonglong = 0;
#endif #endif
/* Copy the real string into a temporary working buffer. */ /* 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) switch (modifier)
{ {
#ifndef CONFIG_LIBC_LONG_LONG
case LL_MOD:
#endif
case HH_MOD: case HH_MOD:
case H_MOD: case H_MOD:
case NO_MOD: case NO_MOD:
default: default:
case L_MOD:
if (sign) if (sign)
{ {
tmplong = strtol(tmp, &endptr, base); tmplong = strtol(tmp, &endptr, base);
@@ -881,7 +883,6 @@ int lib_vsscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
set_errno(errsave); set_errno(errsave);
if (!noassign) if (!noassign)
{ {
/* We have to check whether we need to return a long or /* We have to check whether we need to return a long or
* an int. * an int.
*/ */
@@ -903,8 +904,10 @@ int lib_vsscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
*pint = (unsigned int)tmplong; *pint = (unsigned int)tmplong;
break; break;
default: #ifndef CONFIG_LIBC_LONG_LONG
case L_MOD: case L_MOD:
#endif
default:
linfo("Return %ld to 0x%p\n", tmplong, plong); linfo("Return %ld to 0x%p\n", tmplong, plong);
*plong = tmplong; *plong = tmplong;
break; break;