[texinfo-pretest] texinfo 4.7.91: Fix warnings
Andreas Schwab
schwab at suse.de
Thu Dec 9 09:52:11 EST 2004
This patch fixes some annoying warnings in the 4.7.91 pretest.
Andreas.
2004-12-09 Andreas Schwab <schwab at suse.de>
* info/echo-area.c (DECLARE_INFO_COMMAND): Add intermediate cast
to avoid warning.
* info/infokey.c (compile): Likewise.
* info/session.c (forward_move_node_structure): Likewise.
(DECLARE_INFO_COMMAND): Likewise.
* makeinfo/makeinfo.c (init_paragraph): Don't use free_and_clear
to avoid strict aliasing issue.
* makeinfo/cmds.c (cm_center): Avoid strict aliasing issue.
Index: info/echo-area.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/info/echo-area.c,v
retrieving revision 1.6
diff -u -p -a -r1.6 echo-area.c
--- info/echo-area.c 8 Dec 2004 16:49:48 -0000 1.6
+++ info/echo-area.c 9 Dec 2004 14:47:52 -0000
@@ -936,7 +936,8 @@ DECLARE_INFO_COMMAND (ea_possible_comple
printf_to_message_buffer (completions_found_index == 1
? (char *) _("One completion:\n")
: (char *) _("%d completions:\n"),
- (void*) (completions_found_index), NULL, NULL);
+ (void *) (long) completions_found_index,
+ NULL, NULL);
/* Find the maximum length of a label. */
for (i = 0; i < completions_found_index; i++)
Index: info/infokey.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/info/infokey.c,v
retrieving revision 1.8
diff -u -p -a -r1.8 infokey.c
--- info/infokey.c 8 Dec 2004 16:49:48 -0000 1.8
+++ info/infokey.c 9 Dec 2004 14:47:52 -0000
@@ -639,7 +639,7 @@ compile (FILE *fp, const char *filename,
{
syntax_error (filename, lnum,
(char *) _("NUL character (^%c) not permitted"),
- (void *) (c), NULL, NULL, NULL);
+ (void *) (long) c, NULL, NULL, NULL);
error = 1;
}
seqstate = normal;
@@ -663,7 +663,7 @@ compile (FILE *fp, const char *filename,
if (alen == 0)
{
syntax_error (filename, lnum, (char *) _("missing action name"),
- (void *) (c), NULL, NULL, NULL);
+ (void *) (long) c, NULL, NULL, NULL);
error = 1;
}
else
Index: info/session.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/info/session.c,v
retrieving revision 1.15
diff -u -p -a -r1.15 session.c
--- info/session.c 8 Dec 2004 16:49:48 -0000 1.15
+++ info/session.c 9 Dec 2004 14:47:52 -0000
@@ -962,7 +962,7 @@ forward_move_node_structure (WINDOW *win
same as the first menu item found in this node. */
window_message_in_echo_area
((char *) _("Moving Up %d time(s), then Next."),
- (void *) (up_counter), NULL);
+ (void *) (long) up_counter, NULL);
info_handle_pointer ("Next", window);
return;
@@ -1975,7 +1975,7 @@ DECLARE_INFO_COMMAND (info_menu_digit, _
}
else
info_error ((char *) _("There aren't %d items in this menu."),
- (void *) (item), NULL);
+ (void *) (long) item, NULL);
info_free_references (menu);
return;
Index: makeinfo/cmds.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/cmds.c,v
retrieving revision 1.54
diff -u -p -a -r1.54 cmds.c
--- makeinfo/cmds.c 26 Nov 2004 00:48:35 -0000 1.54
+++ makeinfo/cmds.c 9 Dec 2004 14:47:52 -0000
@@ -1492,17 +1492,17 @@ cm_center (void)
{
if (xml)
{
- unsigned char *line;
+ char *line;
xml_insert_element (CENTER, START);
- get_rest_of_line (0, (char **)&line);
- execute_string ("%s", (char *)line);
+ get_rest_of_line (0, &line);
+ execute_string ("%s", line);
free (line);
xml_insert_element (CENTER, END);
}
else
{
int i, start, length;
- unsigned char *line;
+ char *line;
int save_indented_fill = indented_fill;
int save_filling_enabled = filling_enabled;
int fudge_factor = 1;
@@ -1515,8 +1515,8 @@ cm_center (void)
add_html_block_elt ("<div align=\"center\">");
inhibit_output_flushing ();
- get_rest_of_line (0, (char **)&line);
- execute_string ("%s", (char *)line);
+ get_rest_of_line (0, &line);
+ execute_string ("%s", line);
free (line);
uninhibit_output_flushing ();
if (html)
Index: makeinfo/makeinfo.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.72
diff -u -p -a -r1.72 makeinfo.c
--- makeinfo/makeinfo.c 5 Dec 2004 23:33:08 -0000 1.72
+++ makeinfo/makeinfo.c 9 Dec 2004 14:47:52 -0000
@@ -1839,7 +1839,7 @@ init_internals (void)
void
init_paragraph (void)
{
- free_and_clear ((char **) &output_paragraph);
+ free (output_paragraph);
output_paragraph = xmalloc (paragraph_buffer_len);
output_paragraph[0] = 0;
output_paragraph_offset = 0;
--
Andreas Schwab, SuSE Labs, schwab at suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the texinfo-pretest
mailing list