texinfo-commits
[Top][All Lists]
Advanced

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

[6327] fix some compiler warnings


From: Gavin D. Smith
Subject: [6327] fix some compiler warnings
Date: Tue, 09 Jun 2015 11:12:42 +0000

Revision: 6327
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6327
Author:   gavin
Date:     2015-06-09 11:12:41 +0000 (Tue, 09 Jun 2015)
Log Message:
-----------
fix some compiler warnings

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/dir.c
    trunk/info/indices.c
    trunk/info/info-utils.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-06-09 01:43:24 UTC (rev 6326)
+++ trunk/ChangeLog     2015-06-09 11:12:41 UTC (rev 6327)
@@ -1,5 +1,16 @@
 2015-06-09  Gavin Smith  <address@hidden>
 
+       * info/indices.c (info_virtual_index): Change type of a local 
+       variable to match expected type of argument to next_index_match.        
+       * info/dir.c (dir_entry_of_infodir),
+       * info/info-utils.c (info_get_menu_entry_by_label): Add 
+       parentheses around assignment for clarity.
+       * info/info-utils.c (printed_representation): Change declaration 
+       of a variable from an unsigned char * to a char * and cast it 
+       when we need to check the referent is in a range.
+
+2015-06-09  Gavin Smith  <address@hidden>
+
        * gnulib: Add stdarg module, to try to fix compilations in C89 
        mode due to lack of va_copy.
        * README-hacking: Add note how to ignore files in SVN.

Modified: trunk/info/dir.c
===================================================================
--- trunk/info/dir.c    2015-06-09 01:43:24 UTC (rev 6326)
+++ trunk/info/dir.c    2015-06-09 11:12:41 UTC (rev 6327)
@@ -282,7 +282,7 @@
   NODE *dir_node;
   REFERENCE *entry;
 
-  for (da_index = 0; dir_filename = dirs_to_add[da_index]; da_index++)
+  for (da_index = 0; (dir_filename = dirs_to_add[da_index]); da_index++)
     {
       dir_fullpath = info_add_extension (searchdir, dir_filename, &dummy);
       if (!dir_fullpath)

Modified: trunk/info/indices.c
===================================================================
--- trunk/info/indices.c        2015-06-09 01:43:24 UTC (rev 6326)
+++ trunk/info/indices.c        2015-06-09 11:12:41 UTC (rev 6327)
@@ -794,7 +794,7 @@
   FILE_BUFFER *fb;
   NODE *node;
   struct text_buffer text;
-  size_t i;
+  int i;
   size_t cnt;
   
   fb = file_buffer_of_window (window);

Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c     2015-06-09 01:43:24 UTC (rev 6326)
+++ trunk/info/info-utils.c     2015-06-09 11:12:41 UTC (rev 6327)
@@ -237,7 +237,7 @@
     return 0;
 
   /* First look for an exact match. */
-  for (i = 0; entry = references[i]; i++)
+  for (i = 0; (entry = references[i]); i++)
     {
       if (REFERENCE_MENU_ITEM != entry->type) continue;
       if (strcmp (label, entry->label) == 0)
@@ -251,7 +251,7 @@
       int i;
       int best_guess = -1;
 
-      for (i = 0; entry = references[i]; i++)
+      for (i = 0; (entry = references[i]); i++)
         {
           if (REFERENCE_MENU_ITEM != entry->type) continue;
           if (mbscasecmp (label, entry->label) == 0)
@@ -506,7 +506,7 @@
   int printable_limit = ISO_Latin_p ? 255 : 127;
   struct text_buffer *rep = &printed_rep;
 
-  unsigned char *cur_ptr = (unsigned char *) mbi_cur_ptr (*iter);
+  char *cur_ptr = (char *) mbi_cur_ptr (*iter);
   size_t cur_len = mb_len (mbi_cur (*iter));
 
   text_buffer_reset (&printed_rep);
@@ -561,7 +561,7 @@
     }
 
   /* Show CTRL-x as "^X".  */
-  if (iscntrl (*cur_ptr) && *cur_ptr < 127)
+  if (iscntrl (*cur_ptr) && *(unsigned char *)cur_ptr < 127)
     {
       *pchars = 2;
       *pbytes = 2;
@@ -570,7 +570,7 @@
       return text_buffer_base (rep);
     }
   /* Show META-x as "\370".  */
-  else if (*cur_ptr > printable_limit)
+  else if (*(unsigned char *)cur_ptr > printable_limit)
     {
       *pchars = 4;
       *pbytes = 4;




reply via email to

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