This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
The appended patch removes a number of warnings like:
C-ctype.c:684: warning: deprecated initialization of zero-length array
C-ctype.c:684: warning: (near initialization for `_nl_C_LC_CTYPE.values')
../sysdeps/posix/sigblock.c:38: warning: comparison between signed and unsigned
../sysdeps/posix/sigblock.c:50: warning: comparison between signed and unsigned
../sysdeps/posix/sigsetmask.c:37: warning: comparison between signed and unsigned
../sysdeps/posix/sigsetmask.c:49: warning: comparison between signed and unsigned
fnmatch_loop.c: In function `internal_fnwmatch':
fnmatch_loop.c:456: warning: comparison between signed and unsigned
fnmatch_loop.c:661: warning: comparison between signed and unsigned
dl-open.c:404: warning: comparison between signed and unsigned
dl-close.c:192: warning: comparison between signed and unsigned
dl-load.c:1621: warning: comparison between signed and unsigned
iconv_prog.c:471: warning: comparison between signed and unsigned
iconv_prog.c:502: warning: comparison between signed and unsigned
Is the patch ok to commit?
Andreas
2001-01-12 Andreas Jaeger <aj@suse.de>
* posix/fnmatch_loop.c (FCT): Remove signed warnings.
* posix/wordexp.c (do_parse_glob): Likewise.
* sysdeps/posix/sigblock.c (__sigblock): Removed signed warning.
* sysdeps/posix/sigsetmask.c (__sigsetmask): Likewise.
* elf/dl-open.c (_dl_open): Likewise.
* elf/dl-close.c (_dl_close): Likewise.
* elf/dl-load.c (_dl_map_object): Likewise.
* iconv/iconv_prog.c (process_fd): Likewise.
* locale/localeinfo.h (struct locale_data): Use __flexarr instead
of a zero-length array.
============================================================
Index: posix/fnmatch_loop.c
--- posix/fnmatch_loop.c 2000/10/21 07:27:44 1.16
+++ posix/fnmatch_loop.c 2001/01/12 16:17:43
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993, 1996-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1996-2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This library is free software; you can redistribute it and/or
@@ -438,7 +438,7 @@
const int32_t *symb_table;
# ifdef WIDE_CHAR_VERSION
char str[c1];
- int strcnt;
+ unsigned int strcnt;
# else
# define str (startp + 1)
# endif
@@ -643,7 +643,7 @@
const int32_t *symb_table;
# ifdef WIDE_CHAR_VERSION
char str[c1];
- int strcnt;
+ unsigned int strcnt;
# else
# define str (startp + 1)
# endif
============================================================
Index: posix/wordexp.c
--- posix/wordexp.c 2000/09/26 07:38:59 1.45
+++ posix/wordexp.c 2001/01/12 16:17:46
@@ -1,5 +1,5 @@
/* POSIX.2 wordexp implementation.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Tim Waugh <tim@cyberelk.demon.co.uk>.
@@ -382,7 +382,7 @@
const char *ifs_white)
{
int error;
- int match;
+ unsigned int match;
glob_t globbuf;
error = glob (glob_word, GLOB_NOCHECK, NULL, &globbuf);
============================================================
Index: sysdeps/posix/sigblock.c
--- sysdeps/posix/sigblock.c 1998/07/16 11:31:07 1.7
+++ sysdeps/posix/sigblock.c 2001/01/12 16:17:46
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 94, 95, 96, 97, 98, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@
__sigblock (mask)
int mask;
{
- register int sig;
+ register unsigned int sig;
sigset_t set, oset;
if (__sigemptyset (&set) < 0)
============================================================
Index: sysdeps/posix/sigsetmask.c
--- sysdeps/posix/sigsetmask.c 1997/12/08 02:54:07 1.6
+++ sysdeps/posix/sigsetmask.c 2001/01/12 16:17:46
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1994,1995,1996,1997,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
int
__sigsetmask (int mask)
{
- register int sig;
+ register unsigned int sig;
sigset_t set, oset;
if (__sigemptyset (&set) < 0)
============================================================
Index: elf/dl-open.c
--- elf/dl-open.c 2001/01/11 19:41:03 1.69
+++ elf/dl-open.c 2001/01/12 16:17:46
@@ -1,5 +1,5 @@
/* Load a shared object at runtime, relocate it, and run its initializer.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -397,7 +397,7 @@
state if relocation failed, for example. */
if (args.map)
{
- int i;
+ unsigned int i;
/* Increment open counters for all objects since this has
not happened yet. */
============================================================
Index: elf/dl-close.c
--- elf/dl-close.c 2000/12/31 06:06:46 1.62
+++ elf/dl-close.c 2001/01/12 16:17:47
@@ -1,5 +1,5 @@
/* Close a shared object opened by `_dl_open'.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -182,7 +182,7 @@
if (__builtin_expect (imap->l_global, 0))
{
/* This object is in the global scope list. Remove it. */
- int cnt = _dl_main_searchlist->r_nlist;
+ unsigned int cnt = _dl_main_searchlist->r_nlist;
do
--cnt;
============================================================
Index: elf/dl-load.c
--- elf/dl-load.c 2001/01/09 04:26:00 1.156
+++ elf/dl-load.c 2001/01/12 16:17:49
@@ -1604,7 +1604,7 @@
if (l && __builtin_expect (l->l_flags_1 & DF_1_NODEFLIB, 0))
{
const char *dirp = system_dirs;
- int cnt = 0;
+ unsigned int cnt = 0;
do
{
============================================================
Index: iconv/iconv_prog.c
--- iconv/iconv_prog.c 2001/01/05 00:57:40 1.29
+++ iconv/iconv_prog.c 2001/01/12 16:17:49
@@ -462,7 +462,7 @@
while (actlen < maxlen)
{
- size_t n = read (fd, inptr, maxlen - actlen);
+ ssize_t n = read (fd, inptr, maxlen - actlen);
if (n == 0)
/* No more text to read. */
@@ -482,7 +482,7 @@
if (actlen == maxlen)
while (1)
{
- size_t n;
+ ssize_t n;
/* Increase the buffer. */
maxlen += 32768;
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |