64bit alpha cleanups for glibc 2.1.3
Brad Lucier
lucier@math.purdue.edu
Tue Feb 29 11:34:00 GMT 2000
I built glibc with a current gcc-2.96 snapshot and got some warnings, some
of which indicate errors, I believe. I fixed some of them as indicated.
I'll list nearly all the warnings from the build, separated into ones that I
didn't change (because I couldn't figure out how to fix it) and things I did
change:
Didn't change:
In file included from ../sysdeps/alpha/ldiv.S:23:
/usr/include/asm/gentrap.h:16:53: warning: trigraph ??) ignored
testfnm.c:31:14: warning: trigraph ??/ ignored
../sysdeps/unix/sysv/linux/alpha/getrusage.S:120: Warning: Used $at without ".set noat"
xdr_rec.c: In function `xdrrec_getpos':
xdr_rec.c:306: warning: cast from pointer to integer of different size
xdr_sizeof.c: In function `x_inline':
xdr_sizeof.c:96: warning: cast to pointer from integer of different size
db185/db185.c: In function `__dbopen':
db185/db185.c:96: warning: assignment from incompatible pointer type
programs/ld-collate.c: In function `collate_order_elem':
programs/ld-collate.c:1372: warning: cast to pointer from integer of different size
programs/ld-collate.c: In function `collate_weight_bsymbol':
programs/ld-collate.c:1571: warning: cast from pointer to integer of different size
programs/ld-collate.c: In function `collate_simple_weight':
programs/ld-collate.c:1746: warning: cast from pointer to integer of different size
../sysdeps/libm-ieee754/s_cos.c:86: warning: conflicting types for built-in function `cosl'
../sysdeps/libm-ieee754/s_sin.c:86: warning: conflicting types for built-in function `sinl'
../sysdeps/libm-ieee754/w_sqrt.c:46: warning: conflicting types for built-in function `sqrtl'
In file included from ../include/bits/cmathcalls.h:1,
from ../math/complex.h:88,
from ../include/complex.h:1,
from conj.c:21:
../math/bits/cmathcalls.h: In function `cimagf':
../math/bits/cmathcalls.h:139: warning: function uses short complex types
../math/bits/cmathcalls.h: In function `crealf':
../math/bits/cmathcalls.h:146: warning: function uses short complex types
../math/bits/cmathcalls.h: In function `conjf':
../math/bits/cmathcalls.h:153: warning: function uses short complex types
td_ta_thr_iter.c: In function `td_ta_thr_iter':
td_ta_thr_iter.c:96: warning: type mismatch in implicit declaration for built-in function `alloca'
td_ta_tsd_iter.c: In function `td_ta_tsd_iter':
td_ta_tsd_iter.c:39: warning: type mismatch in implicit declaration for built-in function `alloca'
nss_nis/nis-service.c: In function `_nss_nis_getservbyname_r':
nss_nis/nis-service.c:236: warning: passing arg 6 of `yp_match' from incompatible pointer type
nss_nis/nis-service.c: In function `_nss_nis_getservbyport_r':
nss_nis/nis-service.c:330: warning: passing arg 6 of `yp_match' from incompatible pointer type
Changed (diffs are below):
mbtowc.c: In function `mbtowc':
mbtowc.c:51: warning: type mismatch in implicit declaration for built-in function `memset'
wctomb.c: In function `wctomb':
wctomb.c:47: warning: type mismatch in implicit declaration for built-in function `memset'
mntent_r.c: In function `__addmntent':
mntent_r.c:214: warning: type mismatch in implicit declaration for built-in function `alloca'
gconv_open.c: In function `__gconv_open':
gconv_open.c:52: warning: type mismatch in implicit declaration for built-in function `memset'
dl-runtime.c: In function `fixup':
dl-runtime.c:64: warning: type mismatch in implicit declaration for built-in function `alloca'
lock/lock_region.c: In function `__lock_dump_region':
lock/lock_region.c:635: warning: cast from pointer to integer of different size
lock/lock_region.c:643: warning: cast from pointer to integer of different size
programs/localedef.c: In function `construct_output_path':
programs/localedef.c:499: warning: field width is not type int (arg 4)
connections.c: In function `nscd_run':
connections.c:386: warning: cast from pointer to integer of different size
connections.c: In function `start_threads':
connections.c:512: warning: cast to pointer from integer of different size
sprof.c: In function `generate_call_graph':
sprof.c:1214: warning: field width is not type int (arg 2)
===================================================================
RCS file: RCS/lock_region.c,v
retrieving revision 1.1
diff -c -r1.1 lock_region.c
*** lock_region.c 2000/02/29 18:28:48 1.1
--- lock_region.c 2000/02/29 18:39:09
***************
*** 632,638 ****
for (lp = SH_TAILQ_FIRST(&lrp->free_locks, __db_lock);
lp != NULL;
lp = SH_TAILQ_NEXT(lp, links, __db_lock))
! fprintf(fp, "0x%x: %lu\t%lu\t%s\t0x%x\n", (u_int)lp,
(u_long)lp->holder, (u_long)lp->mode,
__lock_dump_status(lp->status), (u_int)lp->obj);
--- 632,638 ----
for (lp = SH_TAILQ_FIRST(&lrp->free_locks, __db_lock);
lp != NULL;
lp = SH_TAILQ_NEXT(lp, links, __db_lock))
! fprintf(fp, "0x%lx: %lu\t%lu\t%s\t0x%x\n", (u_long)lp,
(u_long)lp->holder, (u_long)lp->mode,
__lock_dump_status(lp->status), (u_int)lp->obj);
***************
*** 640,646 ****
for (op = SH_TAILQ_FIRST(&lrp->free_objs, __db_lockobj);
op != NULL;
op = SH_TAILQ_NEXT(op, links, __db_lockobj))
! fprintf(fp, "0x%x\n", (u_int)op);
}
if (LF_ISSET(LOCK_DUMP_MEM))
--- 640,646 ----
for (op = SH_TAILQ_FIRST(&lrp->free_objs, __db_lockobj);
op != NULL;
op = SH_TAILQ_NEXT(op, links, __db_lockobj))
! fprintf(fp, "0x%lx\n", (u_long)op);
}
if (LF_ISSET(LOCK_DUMP_MEM))
===================================================================
RCS file: RCS/dl-runtime.c,v
retrieving revision 1.1
diff -c -r1.1 dl-runtime.c
*** dl-runtime.c 2000/02/29 18:24:49 1.1
--- dl-runtime.c 2000/02/29 19:24:57
***************
*** 18,23 ****
--- 18,24 ----
Boston, MA 02111-1307, USA. */
#include <unistd.h>
+ #include <stdlib.h>
#include <elf/ldsodefs.h>
#include "dynamic-link.h"
===================================================================
RCS file: RCS/sprof.c,v
retrieving revision 1.1
diff -c -r1.1 sprof.c
*** sprof.c 2000/02/29 19:07:26 1.1
--- sprof.c 2000/02/29 19:17:58
***************
*** 1206,1212 ****
/* Info abount the function itself. */
n = printf ("[%Zu]", cnt);
printf ("%*s%5.1f%8.2f%8.2f%9" PRIdMAX " %s [%Zd]\n",
! 7 - n, " ",
total_ticks ? (100.0 * sortsym[cnt]->ticks) / total_ticks : 0,
sortsym[cnt]->ticks * tick_unit,
0.0, /* FIXME: what's time for the children, recursive */
--- 1206,1212 ----
/* Info abount the function itself. */
n = printf ("[%Zu]", cnt);
printf ("%*s%5.1f%8.2f%8.2f%9" PRIdMAX " %s [%Zd]\n",
! (int) (7 - n), " ",
total_ticks ? (100.0 * sortsym[cnt]->ticks) / total_ticks : 0,
sortsym[cnt]->ticks * tick_unit,
0.0, /* FIXME: what's time for the children, recursive */
===================================================================
RCS file: RCS/gconv_open.c,v
retrieving revision 1.1
diff -c -r1.1 gconv_open.c
*** gconv_open.c 2000/02/29 18:13:19 1.1
--- gconv_open.c 2000/02/29 19:23:49
***************
*** 20,25 ****
--- 20,26 ----
#include <errno.h>
#include <stdlib.h>
+ #include <string.h>
#include <gconv_int.h>
===================================================================
RCS file: RCS/mntent_r.c,v
retrieving revision 1.1
diff -c -r1.1 mntent_r.c
*** mntent_r.c 2000/02/29 18:09:59 1.1
--- mntent_r.c 2000/02/29 19:22:42
***************
*** 21,26 ****
--- 21,27 ----
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
+ #include <stdlib.h>
#ifdef USE_IN_LIBIO
# define flockfile(s) _IO_flockfile (s)
===================================================================
RCS file: RCS/connections.c,v
retrieving revision 1.1
diff -c -r1.1 connections.c
*** connections.c 2000/02/29 19:04:11 1.1
--- connections.c 2000/02/29 19:06:46
***************
*** 383,389 ****
__attribute__ ((__noreturn__))
nscd_run (void *p)
{
! int my_number = (int) p;
struct pollfd conn;
int run_prune = my_number < lastdb && dbs[my_number].enabled;
time_t now = time (NULL);
--- 383,389 ----
__attribute__ ((__noreturn__))
nscd_run (void *p)
{
! long int my_number = (long int) p;
struct pollfd conn;
int run_prune = my_number < lastdb && dbs[my_number].enabled;
time_t now = time (NULL);
***************
*** 497,503 ****
void
start_threads (void)
{
! int i;
pthread_attr_t attr;
pthread_t th;
--- 497,503 ----
void
start_threads (void)
{
! long int i;
pthread_attr_t attr;
pthread_t th;
===================================================================
RCS file: RCS/mbtowc.c,v
retrieving revision 1.1
diff -c -r1.1 mbtowc.c
*** mbtowc.c 2000/02/29 18:04:22 1.1
--- mbtowc.c 2000/02/29 19:21:02
***************
*** 20,25 ****
--- 20,26 ----
#include <wchar.h>
#include <gconv.h>
#include <wcsmbs/wcsmbsload.h>
+ #include <string.h>
/* Common state for all non-restartable conversion functions. */
***************
*** 48,54 ****
/* This is an extension in the Unix standard which does not directly
violate ISO C. */
! memset (&__no_r_state, '\0', sizeof __no_r_state);
result = __wcsmbs_gconv_fcts.towc->stateful;
}
--- 49,55 ----
/* This is an extension in the Unix standard which does not directly
violate ISO C. */
! memset (&__no_r_state, (int) '\0', sizeof __no_r_state);
result = __wcsmbs_gconv_fcts.towc->stateful;
}
===================================================================
RCS file: RCS/wctomb.c,v
retrieving revision 1.1
diff -c -r1.1 wctomb.c
*** wctomb.c 2000/02/29 18:04:46 1.1
--- wctomb.c 2000/02/29 19:21:18
***************
*** 20,25 ****
--- 20,26 ----
#include <wchar.h>
#include <gconv.h>
#include <wcsmbs/wcsmbsload.h>
+ #include <string.h>
extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */
***************
*** 44,50 ****
/* This is an extension in the Unix standard which does not directly
violate ISO C. */
! memset (&__no_r_state, '\0', sizeof __no_r_state);
return __wcsmbs_gconv_fcts.tomb->stateful;
}
--- 45,51 ----
/* This is an extension in the Unix standard which does not directly
violate ISO C. */
! memset (&__no_r_state, (int) '\0', sizeof __no_r_state);
return __wcsmbs_gconv_fcts.tomb->stateful;
}
More information about the Libc-alpha
mailing list