summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-06-05 23:09:24 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-06-05 23:09:24 +0200
commitd80e49d7b6da04efac6ece21497d32b14abb089f (patch)
tree2ba477d7059c4f435654ec55bdea77473b805564
parent84b58ef8701d3d7d6071b391196ee78556f724df (diff)
test: quieten some gcc warnings
Fix some gcc warnings while compiling the testsuite.
-rw-r--r--test/dlopen/tst-origin.c2
-rw-r--r--test/locale-mbwc/dat_mbtowc.c8
-rw-r--r--test/locale-mbwc/tst_funcs.h4
-rw-r--r--test/locale-mbwc/tst_mbrtowc.c9
-rw-r--r--test/test-skeleton.c3
5 files changed, 7 insertions, 19 deletions
diff --git a/test/dlopen/tst-origin.c b/test/dlopen/tst-origin.c
index a12be415b..60fcd3f64 100644
--- a/test/dlopen/tst-origin.c
+++ b/test/dlopen/tst-origin.c
@@ -9,7 +9,7 @@ extern void _dlinfo(void);
int main(int argc, char **argv) {
void *h1, *h2;
- int (*mydltest)(const char *s);
+ int __attribute__((unused))(*mydltest)(const char *s);
char *error;
h1 = dlopen ("libtest31.so", RTLD_LAZY);
diff --git a/test/locale-mbwc/dat_mbtowc.c b/test/locale-mbwc/dat_mbtowc.c
index 6527dfc2e..9a7a9c358 100644
--- a/test/locale-mbwc/dat_mbtowc.c
+++ b/test/locale-mbwc/dat_mbtowc.c
@@ -135,7 +135,7 @@ TST_MBTOWC tst_mbtowc_loc [] = {
{
{ 0, 1, "\xfc\xe4\xf6", MB_LEN_MAX },
{ 0, 1, "\177", MB_LEN_MAX },
- { 0, 0, (char)NULL, MB_LEN_MAX },
+ { 0, 0, NULL, MB_LEN_MAX },
}
},
{
@@ -221,7 +221,7 @@ TST_MBTOWC tst_mbtowc_loc [] = {
{
{ 0, 1, "ABC", MB_LEN_MAX },
{ 0, 1, "\177", MB_LEN_MAX },
- { 0, 0, (char)NULL, MB_LEN_MAX },
+ { 0, 0, NULL, MB_LEN_MAX },
}
},
{
@@ -322,7 +322,7 @@ TST_MBTOWC tst_mbtowc_loc [] = {
{
{ 0, 1, "\244\242A", MB_LEN_MAX },
{ 0, 1, "\177\244\242", MB_LEN_MAX },
- { 0, 0, (char)NULL, MB_LEN_MAX },
+ { 0, 0, NULL, MB_LEN_MAX },
}
},
{
@@ -423,7 +423,7 @@ TST_MBTOWC tst_mbtowc_loc [] = {
{
{ 0, 1, "\343\201\202A", MB_LEN_MAX },
{ 0, 1, "\177\343\201\202", MB_LEN_MAX },
- { 0, 0, (char)NULL, MB_LEN_MAX },
+ { 0, 0, NULL, MB_LEN_MAX },
}
},
{
diff --git a/test/locale-mbwc/tst_funcs.h b/test/locale-mbwc/tst_funcs.h
index 4bd0fb1ab..02d5d341a 100644
--- a/test/locale-mbwc/tst_funcs.h
+++ b/test/locale-mbwc/tst_funcs.h
@@ -84,7 +84,7 @@ extern int result (FILE * fp, char res, const char *func, const char *loc,
#define TST_DECL_VARS(_type_) \
int loc, rec, err_count = 0; \
int warn_count __attribute__ ((unused)); \
- int func_id, seq_num = 0; \
+ int seq_num = 0; \
const char *locale; \
int err_exp, ret_flg; \
int errno_save = 0; \
@@ -97,7 +97,6 @@ extern int result (FILE * fp, char res, const char *func, const char *loc,
#ifdef __UCLIBC_HAS_LOCALE__
#define TST_HEAD_LOCALE(ofunc, s_func) \
- func_id = TST_HEAD (ofunc).func_id; \
locale = TST_HEAD (ofunc).locale; \
if (setlocale (LC_ALL, locale) == NULL) \
{ \
@@ -109,7 +108,6 @@ extern int result (FILE * fp, char res, const char *func, const char *loc,
}
#else
#define TST_HEAD_LOCALE(ofunc, s_func) \
- func_id = TST_HEAD (ofunc).func_id; \
locale = TST_HEAD (ofunc).locale; \
if (strcmp(locale, "C") == 0) \
{ \
diff --git a/test/locale-mbwc/tst_mbrtowc.c b/test/locale-mbwc/tst_mbrtowc.c
index 3a6070a87..b6247ce8c 100644
--- a/test/locale-mbwc/tst_mbrtowc.c
+++ b/test/locale-mbwc/tst_mbrtowc.c
@@ -16,7 +16,7 @@ tst_mbrtowc (FILE * fp, int debug_flg)
char w_flg, s_flg;
char *s;
size_t n;
- char t_flg, t_ini;
+ char t_flg;
static mbstate_t t = { 0 };
mbstate_t *pt;
wchar_t wc, *pwc, wc_ex;
@@ -42,7 +42,6 @@ tst_mbrtowc (FILE * fp, int debug_flg)
s = TST_INPUT_SEQ (mbrtowc).s;
n = TST_INPUT_SEQ (mbrtowc).n;
t_flg = TST_INPUT_SEQ (mbrtowc).t_flg;
- t_ini = TST_INPUT_SEQ (mbrtowc).t_init;
pwc = (w_flg == 0) ? NULL : &wc;
if (s_flg == 0)
@@ -56,12 +55,6 @@ tst_mbrtowc (FILE * fp, int debug_flg)
}
pt = (t_flg == 0) ? NULL : &t;
-#if 0
- if (t_ini != 0)
- {
- memset (&t, 0, sizeof (t));
- }
-#endif
TST_CLEAR_ERRNO;
ret = mbrtowc (pwc, s, n, pt);
TST_SAVE_ERRNO;
diff --git a/test/test-skeleton.c b/test/test-skeleton.c
index 85b4e6788..cf136ac93 100644
--- a/test/test-skeleton.c
+++ b/test/test-skeleton.c
@@ -325,9 +325,6 @@ main (int argc, char *argv[])
if (pid == 0)
{
/* This is the child. */
-#ifdef RLIMIT_DATA
- struct rlimit data_limit;
-#endif
#ifdef RLIMIT_CORE
/* Try to avoid dumping core. */
struct rlimit core_limit;