X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;ds=sidebyside;f=gcc%2Fgcov-io.h;h=0cb93f5e5113efdb658091501d84812a74498693;hb=97f0697bcb479c812b01367c70acf7a84624f732;hp=02bf917765f9b77a82253a2bcbf233b984726d13;hpb=99c149474045fdf0e8347520f8e3b6bb6d932cfa;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 02bf917765f..0cb93f5e511 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -1,5 +1,5 @@ /* Machine-independent I/O routines for gcov. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. Contributed by Bob Manson . This file is part of GNU CC. @@ -22,6 +22,12 @@ Boston, MA 02111-1307, USA. */ #ifndef GCOV_IO_H #define GCOV_IO_H #include +#include + +static int __fetch_long PARAMS ((long *, char *, size_t)) ATTRIBUTE_UNUSED; +static int __store_long PARAMS ((long, char *, size_t)) ATTRIBUTE_UNUSED; +static int __read_long PARAMS ((long *, FILE *, size_t)) ATTRIBUTE_UNUSED; +static int __write_long PARAMS ((long, FILE *, size_t)) ATTRIBUTE_UNUSED; /* These routines only work for signed values. */ @@ -68,17 +74,17 @@ static int __fetch_long (dest, source, bytes) long *dest; char *source; - int bytes; + size_t bytes; { long value = 0; int i; - for (i = bytes - 1; i > (sizeof (*dest) - 1); i--) - if (source[i] & (i == (bytes - 1) ? 127 : 255 )) + for (i = bytes - 1; (size_t) i > (sizeof (*dest) - 1); i--) + if (source[i] & ((size_t) i == (bytes - 1) ? 127 : 255 )) return 1; for (; i >= 0; i--) - value = value * 256 + (source[i] & (i == (bytes - 1) ? 127 : 255)); + value = value * 256 + (source[i] & ((size_t)i == (bytes - 1) ? 127 : 255)); if ((source[bytes - 1] & 128) && (value > 0)) value = - value;