From 29387e76cd5cd340fe7d811dc9830931d3d0ec9b Mon Sep 17 00:00:00 2001 From: Owen Shepherd Date: Thu, 27 Dec 2012 01:13:24 +0000 Subject: [PATCH] Fix warnings --- functions/_PDCLIB/print.c | 4 ++-- functions/string/strncmp.c | 2 +- functions/wchar/wcsncmp.c | 2 +- internals/_PDCLIB_float.h | 1 - opt/dlmalloc/dlmalloc.c | 4 ++-- opt/dlmalloc/dlmalloc.h | 2 +- opt/nothread/cnd_init.c | 2 +- opt/nothread/cnd_signal.c | 2 +- opt/nothread/cnd_wait.c | 2 +- opt/nothread/mtx_destroy.c | 2 +- opt/nothread/mtx_init.c | 2 +- opt/nothread/mtx_lock.c | 2 +- opt/nothread/mtx_timedlock.c | 2 +- opt/nothread/mtx_trylock.c | 2 +- opt/nothread/mtx_unlock.c | 2 +- opt/nothread/thrd_yield.c | 2 +- opt/nothread/tss_create.c | 2 +- opt/nothread/tss_delete.c | 2 +- opt/nothread/tss_get.c | 2 +- opt/nothread/tss_set.c | 2 +- opt/notime/time.c | 2 +- opt/notime/timespec_get.c | 2 +- platform/posix/functions/_PDCLIB/_PDCLIB_freepages.c | 2 +- platform/posix/functions/stdio/_PDCLIB_open.c | 2 +- 24 files changed, 25 insertions(+), 26 deletions(-) diff --git a/functions/_PDCLIB/print.c b/functions/_PDCLIB/print.c index b58fdd9..95fbe9c 100644 --- a/functions/_PDCLIB/print.c +++ b/functions/_PDCLIB/print.c @@ -120,7 +120,7 @@ static void int2base( uintmax_t value, struct _PDCLIB_status_t * status ) unsigned padding = 0; if ( ( ! ( status->flags & E_minus ) ) && ( status->flags & E_zero ) ) { - while( written < status->width ) + while( written < (int) status->width ) { outend[-++written] = '0'; padding++; @@ -156,7 +156,7 @@ static void int2base( uintmax_t value, struct _PDCLIB_status_t * status ) // Space padding to field width if ( ! ( status->flags & ( E_minus | E_zero ) ) ) { - while( written < status->width ) outend[-++written] = ' '; + while( written < (int) status->width ) outend[-++written] = ' '; } // Write output diff --git a/functions/string/strncmp.c b/functions/string/strncmp.c index 4332170..ad9e620 100644 --- a/functions/string/strncmp.c +++ b/functions/string/strncmp.c @@ -18,7 +18,7 @@ int strncmp( const char * s1, const char * s2, size_t n ) ++s2; --n; } - if ( ( n == 0 ) ) + if ( n == 0 ) { return 0; } diff --git a/functions/wchar/wcsncmp.c b/functions/wchar/wcsncmp.c index 920d647..7ca9a98 100644 --- a/functions/wchar/wcsncmp.c +++ b/functions/wchar/wcsncmp.c @@ -18,7 +18,7 @@ int wcsncmp( const wchar_t * s1, const wchar_t * s2, size_t n ) ++s2; --n; } - if ( ( n == 0 ) ) + if ( n == 0 ) { return 0; } diff --git a/internals/_PDCLIB_float.h b/internals/_PDCLIB_float.h index a7305a4..c48d0ec 100644 --- a/internals/_PDCLIB_float.h +++ b/internals/_PDCLIB_float.h @@ -91,4 +91,3 @@ #define _PDCLIB_LDBL_MAX_10_EXP _PDCLIB_concat3( _PDCLIB_FP_, _PDCLIB_LDOUBLE_TYPE, _MAX_10_EXP ) #endif - \ No newline at end of file diff --git a/opt/dlmalloc/dlmalloc.c b/opt/dlmalloc/dlmalloc.c index e0bebcd..18cf0d6 100644 --- a/opt/dlmalloc/dlmalloc.c +++ b/opt/dlmalloc/dlmalloc.c @@ -3836,7 +3836,7 @@ static void* mmap_alloc(mstate m, size_t nb) { /* Realloc using mmap */ static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb, int flags) { size_t oldsize = chunksize(oldp); - flags = flags; /* placate people compiling -Wunused */ + (void) flags; if (is_small(nb)) /* Can't shrink mmap regions below small size */ return 0; /* Keep old chunk if big enough but not too big */ @@ -6262,4 +6262,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/dlmalloc/dlmalloc.h b/opt/dlmalloc/dlmalloc.h index 374fa49..c846557 100644 --- a/opt/dlmalloc/dlmalloc.h +++ b/opt/dlmalloc/dlmalloc.h @@ -76,4 +76,4 @@ static void init_malloc_global_mutex(void) #define LACKS_SYS_TYPES_H #define LACKS_SCHED_H #include -#include \ No newline at end of file +#include diff --git a/opt/nothread/cnd_init.c b/opt/nothread/cnd_init.c index 2d3fc7e..9e22f7d 100644 --- a/opt/nothread/cnd_init.c +++ b/opt/nothread/cnd_init.c @@ -16,4 +16,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/cnd_signal.c b/opt/nothread/cnd_signal.c index 363806e..74fa676 100644 --- a/opt/nothread/cnd_signal.c +++ b/opt/nothread/cnd_signal.c @@ -15,4 +15,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/cnd_wait.c b/opt/nothread/cnd_wait.c index be2fcbb..54c3917 100644 --- a/opt/nothread/cnd_wait.c +++ b/opt/nothread/cnd_wait.c @@ -15,4 +15,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/mtx_destroy.c b/opt/nothread/mtx_destroy.c index 5227274..8f359c8 100644 --- a/opt/nothread/mtx_destroy.c +++ b/opt/nothread/mtx_destroy.c @@ -13,4 +13,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/mtx_init.c b/opt/nothread/mtx_init.c index 76b3eeb..21bb473 100644 --- a/opt/nothread/mtx_init.c +++ b/opt/nothread/mtx_init.c @@ -16,4 +16,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/mtx_lock.c b/opt/nothread/mtx_lock.c index efe26bd..13b0d1c 100644 --- a/opt/nothread/mtx_lock.c +++ b/opt/nothread/mtx_lock.c @@ -16,4 +16,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/mtx_timedlock.c b/opt/nothread/mtx_timedlock.c index 6ab7dfb..699d004 100644 --- a/opt/nothread/mtx_timedlock.c +++ b/opt/nothread/mtx_timedlock.c @@ -15,4 +15,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/mtx_trylock.c b/opt/nothread/mtx_trylock.c index 20efc99..e7bd885 100644 --- a/opt/nothread/mtx_trylock.c +++ b/opt/nothread/mtx_trylock.c @@ -16,4 +16,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/mtx_unlock.c b/opt/nothread/mtx_unlock.c index 97a93a6..d22d40e 100644 --- a/opt/nothread/mtx_unlock.c +++ b/opt/nothread/mtx_unlock.c @@ -17,4 +17,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/thrd_yield.c b/opt/nothread/thrd_yield.c index c92c495..2d184ce 100644 --- a/opt/nothread/thrd_yield.c +++ b/opt/nothread/thrd_yield.c @@ -15,4 +15,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/tss_create.c b/opt/nothread/tss_create.c index e7ad53a..7faa4f9 100644 --- a/opt/nothread/tss_create.c +++ b/opt/nothread/tss_create.c @@ -18,4 +18,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/tss_delete.c b/opt/nothread/tss_delete.c index 758209f..0876e7d 100644 --- a/opt/nothread/tss_delete.c +++ b/opt/nothread/tss_delete.c @@ -16,4 +16,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/tss_get.c b/opt/nothread/tss_get.c index c302fff..ee031f1 100644 --- a/opt/nothread/tss_get.c +++ b/opt/nothread/tss_get.c @@ -27,4 +27,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/nothread/tss_set.c b/opt/nothread/tss_set.c index d8ae84b..da02b04 100644 --- a/opt/nothread/tss_set.c +++ b/opt/nothread/tss_set.c @@ -17,4 +17,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/notime/time.c b/opt/notime/time.c index 6a4743a..3933af6 100644 --- a/opt/notime/time.c +++ b/opt/notime/time.c @@ -16,4 +16,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/opt/notime/timespec_get.c b/opt/notime/timespec_get.c index 0dcec1a..9332ce3 100644 --- a/opt/notime/timespec_get.c +++ b/opt/notime/timespec_get.c @@ -15,4 +15,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/platform/posix/functions/_PDCLIB/_PDCLIB_freepages.c b/platform/posix/functions/_PDCLIB/_PDCLIB_freepages.c index ed4ea0c..5b21c4b 100644 --- a/platform/posix/functions/_PDCLIB/_PDCLIB_freepages.c +++ b/platform/posix/functions/_PDCLIB/_PDCLIB_freepages.c @@ -29,4 +29,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif diff --git a/platform/posix/functions/stdio/_PDCLIB_open.c b/platform/posix/functions/stdio/_PDCLIB_open.c index 9f3cdec..17bd022 100644 --- a/platform/posix/functions/stdio/_PDCLIB_open.c +++ b/platform/posix/functions/stdio/_PDCLIB_open.c @@ -59,4 +59,4 @@ int main( void ) return TEST_RESULTS; } -#endif \ No newline at end of file +#endif -- 2.40.0