]> pd.if.org Git - pdclib/blobdiff - functions/stdio/_PDCLIB_print.c
PDCLib includes with quotes, not <>.
[pdclib] / functions / stdio / _PDCLIB_print.c
index f264a6178cdb1520e575667839f320c83acc5267..c14516f6913dfbba39ccace1efd4664b7024c3b5 100644 (file)
@@ -14,7 +14,7 @@
 #include <limits.h>
 
 #ifndef REGTEST
-#include <_PDCLIB_io.h>
+#include "_PDCLIB_io.h"
 
 /* Using an integer's bits as flags for both the conversion flags and length
    modifiers.
@@ -501,7 +501,8 @@ int _PDCLIB_print( const char * spec, struct _PDCLIB_status_t * status )
         /* TODO: Check for invalid flag combinations. */
         if ( status->flags & E_unsigned )
         {
-            uintmax_t value;
+            /* TODO: Marking the default case _PDCLIB_UNREACHABLE breaks %ju test driver? */
+            uintmax_t value = 0;
             switch ( status->flags & E_TYPES )
             {
                 case E_char:
@@ -536,7 +537,7 @@ int _PDCLIB_print( const char * spec, struct _PDCLIB_status_t * status )
         }
         else
         {
-            intmax_t value;
+            intmax_t value = 0;
             switch ( status->flags & E_TYPES )
             {
                 case E_char:
@@ -566,6 +567,8 @@ int _PDCLIB_print( const char * spec, struct _PDCLIB_status_t * status )
                 case E_intmax:
                     value = va_arg( status->arg, intmax_t );
                     break;
+                default:
+                    _PDCLIB_UNREACHABLE;
             }
 
             if (!int2base( value, status ) )
@@ -588,7 +591,7 @@ int _PDCLIB_print( const char * spec, struct _PDCLIB_status_t * status )
 #define _PDCLIB_FILEID "_PDCLIB/print.c"
 #define _PDCLIB_STRINGIO
 
-#include <_PDCLIB_test.h>
+#include "_PDCLIB_test.h"
 
 #ifndef REGTEST
 static size_t testcb( void *p, const char *buf, size_t size )