Avoid warnings in libcpp/lex.c

Andreas Jaeger aj@suse.de
Sun Mar 27 20:05:00 GMT 2005


The appended patch fixes these warnings:

/cvs/gcc/libcpp/lex.c:448: warning: field precision is not type int (arg 6)
/cvs/gcc/libcpp/lex.c:451: warning: field precision is not type int (arg 6)

Bootstrapped and reg.tested on x86_64-linux-gnu.  Ok to commit?

Andreas

2005-03-27  Andreas Jaeger  <aj@suse.de>

	* lex.c (warn_about_normalization): Avoid warning.

============================================================
Index: libcpp/lex.c
--- libcpp/lex.c	15 Mar 2005 09:55:41 -0000	1.8
+++ libcpp/lex.c	27 Mar 2005 12:07:09 -0000
@@ -1,5 +1,5 @@
 /* CPP Library - lexical analysis.
-   Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    Contributed by Per Bothner, 1994-95.
    Based on CCCP program by Paul Rubin, June 1986
    Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -445,10 +445,10 @@ warn_about_normalization (cpp_reader *pf
       sz = cpp_spell_token (pfile, token, buf, false) - buf;
       if (NORMALIZE_STATE_RESULT (s) == normalized_C)
 	cpp_error_with_line (pfile, CPP_DL_WARNING, token->src_loc, 0,
-			     "`%.*s' is not in NFKC", sz, buf);
+			     "`%.*s' is not in NFKC", (int) sz, buf);
       else
 	cpp_error_with_line (pfile, CPP_DL_WARNING, token->src_loc, 0,
-			     "`%.*s' is not in NFC", sz, buf);
+			     "`%.*s' is not in NFC", (int) sz, buf);
     }
 }
 

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050327/515c5b3e/attachment.sig>


More information about the Gcc-patches mailing list