break;
case E_intmax:
value = va_arg( status->arg, uintmax_t );
+ default:
+ _PDCLIB_UNREACHABLE;
}
if ( !int2base( value, status ) )
return -1;
case E_intmax:
value = va_arg( status->arg, intmax_t );
break;
+ default:
+ _PDCLIB_UNREACHABLE;
}
if (!int2base( value, status ) )
#ifndef REGTEST
+#include "_PDCLIB_io.h"
+
/* Using an integer's bits as flags for both the conversion flags and length
modifiers.
*/
const char * _PDCLIB_scan( const char * spec, struct _PDCLIB_status_t * status )
{
/* generic input character */
- int rc;
+ int rc = EOF;
const char * orig_spec = spec;
if ( *(++spec) == '%' )
{
#if defined( _PDCLIB_FILEIO )
#define GET_RESULT \
rewind( target ); \
- fread( result_buffer, 1, actual_rc, target );
+ if ( (int)fread( result_buffer, 1, actual_rc, target ) != actual_rc ) \
+ { \
+ fprintf( stderr, "GET_RESULT failed." ); \
+ }
#define RESULT_MISMATCH( act, exp ) strcmp( result_buffer, exp ) != 0
#define RESULT_STRING( tgt ) result_buffer
#elif defined( _PDCLIB_STRINGIO )