diff --git a/libcmt/file.c b/libcmt/file.c index f8a752268..3332ffe04 100644 --- a/libcmt/file.c +++ b/libcmt/file.c @@ -36,9 +36,9 @@ FILE *freopen(const char *filename,const char *mode,FILE *stream) } stream->file=0l; } +#endif if(error) return NULL; -#endif if(filename!=NULL) { diff --git a/libcmt/stdlib_calloc.c b/libcmt/stdlib_calloc.c index d66c4b72b..95ecf34f8 100644 --- a/libcmt/stdlib_calloc.c +++ b/libcmt/stdlib_calloc.c @@ -42,7 +42,11 @@ /****************************************************************************/ STATIC void * +#ifdef __MEM_DEBUG __calloc(size_t num_elements,size_t element_size,const char * file,int line) +#else +__calloc(size_t num_elements,size_t element_size) +#endif { void * result = NULL; size_t total_size; @@ -69,7 +73,11 @@ calloc(size_t num_elements,size_t element_size) { void * result; +#ifdef __MEM_DEBUG result = __calloc(num_elements,element_size,NULL,0); +#else + result = __calloc(num_elements,element_size); +#endif return(result); } diff --git a/libcmt/strings_strcasecmp.c b/libcmt/strings_strcasecmp.c index 4f768002d..6b373797b 100644 --- a/libcmt/strings_strcasecmp.c +++ b/libcmt/strings_strcasecmp.c @@ -81,7 +81,5 @@ strcasecmp(const char * _s1, const char * _s2) result = (int)c1 - (int)c2; } - out: - return(result); } diff --git a/libcmt/vsnprintf.c b/libcmt/vsnprintf.c index d64daf69f..9a62fe2c5 100644 --- a/libcmt/vsnprintf.c +++ b/libcmt/vsnprintf.c @@ -318,6 +318,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args) break; case 'X': flags |= DP_F_UP; + /* fall through */ case 'x': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) @@ -340,6 +341,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args) break; case 'E': flags |= DP_F_UP; + /* fall through */ case 'e': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); @@ -348,6 +350,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args) break; case 'G': flags |= DP_F_UP; + /* fall through */ case 'g': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE);