texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo ChangeLog info/footnotes.c info/infodoc...


From: Karl Berry
Subject: texinfo ChangeLog info/footnotes.c info/infodoc...
Date: Sat, 21 Apr 2012 00:38:09 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Karl Berry <karl>       12/04/21 00:38:09

Modified files:
        .              : ChangeLog 
        info           : footnotes.c infodoc.c infomap.c session.c 

Log message:
        pacify -Wformat-security, Julian Gilbey, 18 Apr 2012 18:24:04

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/ChangeLog?cvsroot=texinfo&r1=1.1354&r2=1.1355
http://cvs.savannah.gnu.org/viewcvs/texinfo/info/footnotes.c?cvsroot=texinfo&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/texinfo/info/infodoc.c?cvsroot=texinfo&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/texinfo/info/infomap.c?cvsroot=texinfo&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/texinfo/info/session.c?cvsroot=texinfo&r1=1.54&r2=1.55

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.1354
retrieving revision 1.1355
diff -u -b -r1.1354 -r1.1355
--- ChangeLog   20 Apr 2012 18:52:47 -0000      1.1354
+++ ChangeLog   21 Apr 2012 00:38:02 -0000      1.1355
@@ -1,3 +1,12 @@
+2012-04-20  Julian Gilbey  <address@hidden>  (tiny change)
+
+       * info/footnotes.c,
+       * info/infodoc.c,
+       * info/infomap.c,
+       * info/session.c: use "%s" as first arg to info_error,
+       even with constant strings, to pacify -Wformat-security.
+       http://bugs.debian.org/656659.
+
 2012-04-20  Karl Berry  <address@hidden>
 
        * util/texi2dvi: more doc on --dvipdf, spelling.

Index: info/footnotes.c
===================================================================
RCS file: /sources/texinfo/texinfo/info/footnotes.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- info/footnotes.c    12 Apr 2012 10:38:28 -0000      1.13
+++ info/footnotes.c    21 Apr 2012 00:38:03 -0000      1.14
@@ -1,5 +1,5 @@
 /* footnotes.c -- Some functions for manipulating footnotes.
-   $Id: footnotes.c,v 1.13 2012/04/12 10:38:28 gray Exp $
+   $Id: footnotes.c,v 1.14 2012/04/21 00:38:03 karl Exp $
 
    Copyright (C) 1993, 1997, 1998, 1999, 2002, 2004, 2007, 2008, 2011
    Free Software Foundation, Inc.
@@ -255,11 +255,11 @@
       switch (result)
         {
         case FN_UNFOUND:
-          info_error (msg_no_foot_node);
+          info_error ("%s", msg_no_foot_node);
           break;
 
         case FN_UNABLE:
-          info_error (msg_win_too_small);
+          info_error ("%s", msg_win_too_small);
           break;
         }
     }

Index: info/infodoc.c
===================================================================
RCS file: /sources/texinfo/texinfo/info/infodoc.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- info/infodoc.c      12 Apr 2012 10:38:29 -0000      1.31
+++ info/infodoc.c      21 Apr 2012 00:38:03 -0000      1.32
@@ -1,5 +1,5 @@
 /* infodoc.c -- functions which build documentation nodes.
-   $Id: infodoc.c,v 1.31 2012/04/12 10:38:29 gray Exp $
+   $Id: infodoc.c,v 1.32 2012/04/21 00:38:03 karl Exp $
 
    Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
    2007, 2008, 2011
@@ -478,7 +478,7 @@
     }
   else
     {
-      info_error (msg_cant_make_help);
+      info_error ("%s", msg_cant_make_help);
     }
 }
 
@@ -520,7 +520,7 @@
   if (!node)
     {
       if (info_recent_file_error)
-        info_error (info_recent_file_error);
+        info_error ("%s", info_recent_file_error);
       else
         info_error (msg_cant_file_node, "Info", nodename);
     }

Index: info/infomap.c
===================================================================
RCS file: /sources/texinfo/texinfo/info/infomap.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- info/infomap.c      17 Nov 2011 10:04:59 -0000      1.24
+++ info/infomap.c      21 Apr 2012 00:38:04 -0000      1.25
@@ -1,5 +1,5 @@
 /* infomap.c -- keymaps for Info.
-   $Id: infomap.c,v 1.24 2011/11/17 10:04:59 gray Exp $
+   $Id: infomap.c,v 1.25 2012/04/21 00:38:04 karl Exp $
 
    Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2007,
    2008, 2011 Free Software Foundation, Inc.
@@ -939,7 +939,7 @@
         {
                 if (filename && errno != ENOENT)
                 {
-                        info_error(filesys_error_string(filename, errno));
+                        info_error("%s", filesys_error_string(filename, 
errno));
                         free(filename);
                 }
                 return 0;
@@ -1169,7 +1169,7 @@
                 }
         }
         if (state != getseq)
-                info_error(_("Bad data in infokey file -- some key bindings 
ignored"));
+                info_error("%s", _("Bad data in infokey file -- some key 
bindings ignored"));
         return !stop;
 }
 
@@ -1218,7 +1218,7 @@
               }
           }
       if (state != getvar)
-        info_error(_("Bad data in infokey file -- some var settings ignored"));
+        info_error("%s", _("Bad data in infokey file -- some var settings 
ignored"));
 }
 
 void

Index: info/session.c
===================================================================
RCS file: /sources/texinfo/texinfo/info/session.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- info/session.c      12 Apr 2012 10:38:30 -0000      1.54
+++ info/session.c      21 Apr 2012 00:38:06 -0000      1.55
@@ -1,5 +1,5 @@
 /* session.c -- user windowing interface to Info.
-   $Id: session.c,v 1.54 2012/04/12 10:38:30 gray Exp $
+   $Id: session.c,v 1.55 2012/04/21 00:38:06 karl Exp $
 
    Copyright (C) 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
    2004, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
@@ -115,7 +115,7 @@
           if (!largest)
             {
               display_update_display (windows);
-              info_error (msg_cant_find_window);
+              info_error ("%s", msg_cant_find_window);
               info_session ();
               xexit (0);
             }
@@ -130,7 +130,7 @@
           else
             {
               display_update_display (windows);
-              info_error (msg_win_too_small);
+              info_error ("%s", msg_win_too_small);
               info_session ();
               xexit (0);
             }
@@ -597,7 +597,7 @@
 {
   if (old == -1)
     {
-      info_error (msg_cant_find_point);
+      info_error ("%s", msg_cant_find_point);
     }
   else
     {
@@ -1145,7 +1145,7 @@
   switch (behaviour)
     {
     case IS_PageOnly:
-      info_error (msg_at_node_bottom);
+      info_error ("%s", msg_at_node_bottom);
       return 1;
 
     case IS_NextOnly:
@@ -1168,7 +1168,7 @@
            switch (scroll_last_node)
              {
              case SLN_Stop:
-               info_error (_("No more nodes within this document."));
+               info_error ("%s", _("No more nodes within this document."));
                return 1;
                
              case SLN_Scroll:
@@ -1292,7 +1292,7 @@
                   window->point = info_win->points[old_current];
                   recalculate_line_starts (window);
                   window->flags |= W_UpdateWindow;
-                  info_error (_("No more nodes within this document."));
+                  info_error ("%s", _("No more nodes within this document."));
                   return 1;
                 }
             }
@@ -1310,14 +1310,14 @@
   switch (behaviour)
     {
     case IS_PageOnly:
-      info_error (msg_at_node_top);
+      info_error ("%s", msg_at_node_top);
       return 1;
 
     case IS_NextOnly:
       info_prev_label_of_node (window->node);
       if (!info_parsed_nodename && !info_parsed_filename)
         {
-          info_error (_("No `Prev' for this node."));
+          info_error ("%s", _("No `Prev' for this node."));
           return 1;
         }
       else
@@ -1336,7 +1336,7 @@
           if (!info_parsed_nodename && (!info_parsed_filename
                                         || is_dir_name (info_parsed_filename)))
             {
-              info_error (
+              info_error ("%s", 
                     _("No `Prev' or `Up' for this node within this 
document."));
               return 1;
             }
@@ -1695,7 +1695,7 @@
   /* If no other window, error now. */
   if (!windows->next && !echo_area_is_active)
     {
-      info_error (msg_one_window);
+      info_error ("%s", msg_one_window);
       return;
     }
 
@@ -1735,7 +1735,7 @@
 
   if (!windows->next && !echo_area_is_active)
     {
-      info_error (msg_one_window);
+      info_error ("%s", msg_one_window);
       return;
     }
 
@@ -1791,7 +1791,7 @@
 
   if (!split)
     {
-      info_error (msg_win_too_small);
+      info_error ("%s", msg_win_too_small);
     }
   else
     {
@@ -1860,11 +1860,11 @@
 {
   if (!windows->next)
     {
-      info_error (msg_cant_kill_last);
+      info_error ("%s", msg_cant_kill_last);
     }
   else if (window->flags & W_WindowIsPerm)
     {
-      info_error (_("Cannot delete a permanent window"));
+      info_error ("%s", _("Cannot delete a permanent window"));
     }
   else
     {
@@ -1949,7 +1949,7 @@
   /* If only one window, give up. */
   if (!windows->next)
     {
-      info_error (msg_one_window);
+      info_error ("%s", msg_one_window);
       return;
     }
 
@@ -2077,7 +2077,7 @@
   if (!node)
     {
       if (file_system_error)
-        info_error (file_system_error);
+        info_error ("%s", file_system_error);
       else
         info_error (msg_cant_find_node, nodename);
     }
@@ -2153,7 +2153,7 @@
       else
         {
           if (info_recent_file_error)
-            info_error (info_recent_file_error);
+            info_error ("%s", info_recent_file_error);
           else
             info_error (msg_cant_file_node, filename, nodename);
         }
@@ -2220,7 +2220,7 @@
     }
 
   if (!node)
-    info_error (_("This window has no additional nodes"));
+    info_error ("%s", _("This window has no additional nodes"));
   else
     info_set_node_of_window (1, window, node);
 }
@@ -2254,7 +2254,7 @@
     }
 
   if (!node)
-    info_error (_("This window has no additional nodes"));
+    info_error ("%s", _("This window has no additional nodes"));
   else
     info_set_node_of_window (1, window, node);
 }
@@ -2276,7 +2276,7 @@
 
   if (!menu)
     {
-      info_error (msg_no_menu_node);
+      info_error ("%s", msg_no_menu_node);
       return;
     }
 
@@ -2391,9 +2391,9 @@
   if (!menu)
     {
       if (builder == info_menu_of_node)
-        info_error (msg_no_menu_node);
+        info_error ("%s", msg_no_menu_node);
       else
-        info_error (msg_no_xref_node);
+        info_error ("%s", msg_no_xref_node);
       return;
     }
 
@@ -2669,7 +2669,7 @@
       window->flags |= W_UpdateWindow;
     }
   else
-    info_error (msg_no_menu_node);
+    info_error ("%s", msg_no_menu_node);
 }
 
 /* Visit as many menu items as is possible, each in a separate window. */
@@ -2682,7 +2682,7 @@
   menu = info_menu_of_node (window->node);
 
   if (!menu)
-    info_error (msg_no_menu_node);
+    info_error ("%s", msg_no_menu_node);
 
   for (i = 0; (!info_error_was_printed) && (entry = menu[i]); i++)
     {
@@ -2692,7 +2692,7 @@
       window_tile_windows (TILE_INTERNALS);
 
       if (!new)
-        info_error (msg_win_too_small);
+        info_error ("%s", msg_win_too_small);
       else
         {
           active_window = new;
@@ -3313,7 +3313,7 @@
   /* If there are no more nodes left anywhere to view, complain and exit. */
   if (info_windows_index == 1 && info_windows[0]->nodes_index == 1)
     {
-      info_error (_("Cannot kill the last node"));
+      info_error ("%s", _("Cannot kill the last node"));
       return;
     }
 
@@ -3432,7 +3432,7 @@
       if (!node)
         {
           if (info_recent_file_error)
-            info_error (info_recent_file_error);
+            info_error ("%s", info_recent_file_error);
           else
             info_error (_("Cannot find `%s'."), line);
         }
@@ -3490,7 +3490,7 @@
     fclose (output_stream);
 
 #if defined (VERBOSE_NODE_DUMPING)
-  info_error (_("Done."));
+  info_error ("%s", _("Done."));
 #endif /* VERBOSE_NODE_DUMPING */
 }
 
@@ -3520,7 +3520,7 @@
   if (!node)
     {
       if (info_recent_file_error)
-        info_error (info_recent_file_error);
+        info_error ("%s", info_recent_file_error);
       else
         {
           if (filename && *nodename != '(')
@@ -3611,7 +3611,7 @@
     fclose (output_stream);
 
 #if defined (VERBOSE_NODE_DUMPING)
-  info_error (_("Done."));
+  info_error ("%s", _("Done."));
 #endif /* VERBOSE_NODE_DUMPING */
 }
 
@@ -3671,7 +3671,7 @@
     fclose (printer_pipe);
 
 #if defined (VERBOSE_NODE_DUMPING)
-  info_error (_("Done."));
+  info_error ("%s", _("Done."));
 #endif /* VERBOSE_NODE_DUMPING */
 }
 
@@ -3994,7 +3994,7 @@
               if (!echo_area_is_active)
                 {
                   if (info_recent_file_error)
-                    info_error (info_recent_file_error);
+                    info_error ("%s", info_recent_file_error);
                   else
                     info_error (msg_cant_file_node,
                                 filename_non_directory (file_buffer->filename),
@@ -4124,7 +4124,7 @@
 
   if (mbslen (search_string) < min_search_length)
     {
-      info_error (_("Search string too short"));
+      info_error ("%s", _("Search string too short"));
       return;
     }
 
@@ -4145,7 +4145,7 @@
                                   NULL);
 
   if (result != 0 && !info_error_was_printed)
-    info_error (_("Search failed."));
+    info_error ("%s", _("Search failed."));
   else if (old_pagetop != active_window->pagetop)
     {
       int new_pagetop;
@@ -4166,7 +4166,7 @@
                       _("Repeat last search in the same direction"))
 {
   if (!last_search_direction)
-    info_error (_("No previous search string"));
+    info_error ("%s", _("No previous search string"));
   else
     info_search_1 (window, last_search_direction * count,
                    key, last_search_case_sensitive, 0);
@@ -4176,7 +4176,7 @@
                       _("Repeat last search in the reverse direction"))
 {
   if (!last_search_direction)
-    info_error (_("No previous search string"));
+    info_error ("%s", _("No previous search string"));
   else
     info_search_1 (window, -last_search_direction * count,
                    key, last_search_case_sensitive, 0);
@@ -4719,7 +4719,7 @@
   if (firstmenu == -1 && firstxref == -1)
     {
       if (!cursor_movement_scrolls_p)
-        info_error (msg_no_xref_node);
+        info_error ("%s", msg_no_xref_node);
       return cursor_movement_scrolls_p;
     }
 
@@ -4862,7 +4862,7 @@
      do it. */
   if (!info_error_rings_bell_p)
     terminal_ring_bell ();
-  info_error (_("Quit"));
+  info_error ("%s", _("Quit"));
 
   info_initialize_numeric_arg ();
   info_clear_pending_input ();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]