From 2a068d20fbe9e59b9c43dbeb9fa54999bdb19e10 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 25 Nov 2000 01:26:30 +0000 Subject: Update. * locale/findlocale.c: Add casts to avoid warnings. * locale/localeinfo.h (LIMAGIC): Add cast to avoid warnings. * misc/efgcvt_r.c (fcvt_r): Use ssize_t instead of int and add cast to avoid warnings. * misc/tsearch.c (const_node): New type. (trecurse): Correct casts to avoid warnings. (__twalk): Likewise. * stdlib/tst-limits.c: Add z modifier to formats for WORD_BIT and LONG_BIT. * debug/backtrace-tst.c (compare): Add casts to avoid warnings. --- misc/efgcvt_r.c | 7 ++++--- misc/tsearch.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'misc') diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c index 1a039ef..1408b6d 100644 --- a/misc/efgcvt_r.c +++ b/misc/efgcvt_r.c @@ -1,5 +1,5 @@ /* Compatibility functions for floating point formatting, reentrant versions. - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,1999,2000 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 @@ -60,7 +60,8 @@ APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len) char *buf; size_t len; { - int n, i; + ssize_t n; + ssize_t i; int left; if (buf == NULL) @@ -102,7 +103,7 @@ APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len) n = __snprintf (buf, len, "%.*" FLOAT_FMT_FLAG "f", MIN (ndigit, NDIGIT_MAX), value); /* Check for a too small buffer. */ - if (n >= len) + if (n >= (ssize_t) len) return -1; i = 0; diff --git a/misc/tsearch.c b/misc/tsearch.c index 0cf854b..e9b587c 100644 --- a/misc/tsearch.c +++ b/misc/tsearch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Bernd Schmidt , 1997. @@ -97,6 +97,7 @@ typedef struct node_t struct node_t *right; unsigned int red:1; } *node; +typedef const struct node_t *const_node; #undef DEBUGGING @@ -594,7 +595,7 @@ static void internal_function trecurse (const void *vroot, __action_fn_t action, int level) { - node root = (node ) vroot; + const_node root = (const_node) vroot; if (root->left == NULL && root->right == NULL) (*action) (root, leaf, level); @@ -617,7 +618,7 @@ trecurse (const void *vroot, __action_fn_t action, int level) void __twalk (const void *vroot, __action_fn_t action) { - const node root = (node) vroot; + const_node root = (const_node) vroot; CHECK_TREE (root); -- cgit v1.1