emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r112032: Static checking by Sun C 5.1


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112032: Static checking by Sun C 5.12.
Date: Wed, 13 Mar 2013 00:27:34 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 112032
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2013-03-13 00:27:34 -0700
message:
  Static checking by Sun C 5.12.
  
  * lib-src/etags.c (analyse_regex): Omit unreachable code.
  * src/alloc.c (buffer_memory_full) [REL_ALLOC]:
  * src/bytecode.c (exec_byte_code):
  * src/dispnew.c (init_display):
  * src/eval.c (error):
  * src/fileio.c (Fsubstitute_in_file_name):
  * src/keyboard.c (Fevent_convert_list):
  * src/keymap.c (Fsingle_key_description):
  * src/term.c (maybe_fatal, fatal):
  * src/xfns.c (Fx_display_backing_store, Fx_display_visual_class):
  * src/xsmfns.c (Fhandle_save_session):
  Omit unreachable code.
  * src/keymap.c (map_keymap_char_table_item): Cast void * to
  a function pointer type; the C Standard requires this.
modified:
  lib-src/ChangeLog
  lib-src/etags.c
  src/ChangeLog
  src/alloc.c
  src/bytecode.c
  src/dispnew.c
  src/eval.c
  src/fileio.c
  src/keyboard.c
  src/keymap.c
  src/term.c
  src/xfns.c
  src/xsmfns.c
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2013-03-13 01:05:40 +0000
+++ b/lib-src/ChangeLog 2013-03-13 07:27:34 +0000
@@ -1,5 +1,8 @@
 2013-03-13  Paul Eggert  <address@hidden>
 
+       Static checking by Sun C 5.12.
+       * etags.c (analyse_regex): Omit unreachable code.
+
        * movemail.c (main): Call umask on all systems.
        This is OK since Emacs already assumes umask elsewhere.
        Don't grant more read permissions than necessary.

=== modified file 'lib-src/etags.c'
--- a/lib-src/etags.c   2013-03-05 17:13:01 +0000
+++ b/lib-src/etags.c   2013-03-13 07:27:34 +0000
@@ -5628,10 +5628,7 @@
        /* regexfile is a file containing regexps, one per line. */
        regexfp = fopen (regexfile, "r");
        if (regexfp == NULL)
-         {
-           pfatal (regexfile);
-           return;
-         }
+         pfatal (regexfile);
        linebuffer_init (&regexbuf);
        while (readline_internal (&regexbuf, regexfp) > 0)
          analyse_regex (regexbuf.buffer);

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-03-13 05:04:46 +0000
+++ b/src/ChangeLog     2013-03-13 07:27:34 +0000
@@ -1,5 +1,20 @@
 2013-03-13  Paul Eggert  <address@hidden>
 
+       Static checking by Sun C 5.12.
+       * alloc.c (buffer_memory_full) [REL_ALLOC]:
+       * bytecode.c (exec_byte_code):
+       * dispnew.c (init_display):
+       * eval.c (error):
+       * fileio.c (Fsubstitute_in_file_name):
+       * keyboard.c (Fevent_convert_list):
+       * keymap.c (Fsingle_key_description):
+       * term.c (maybe_fatal, fatal):
+       * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
+       * xsmfns.c (Fhandle_save_session):
+       Omit unreachable code.
+       * keymap.c (map_keymap_char_table_item): Cast void * to
+       a function pointer type; the C Standard requires this.
+
        * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
        Include <sys/param.h> unconditionally, as that works elsewhere and
        is simpler here.  Include <sys/sysctl.h> if DARWIN_OS ||

=== modified file 'src/alloc.c'
--- a/src/alloc.c       2013-02-08 05:28:52 +0000
+++ b/src/alloc.c       2013-03-13 07:27:34 +0000
@@ -422,11 +422,11 @@
 
 #ifndef REL_ALLOC
   memory_full (nbytes);
-#endif
-
+#else
   /* This used to call error, but if we've run out of memory, we could
      get infinite recursion trying to build the string.  */
   xsignal (Qnil, Vmemory_signal_data);
+#endif
 }
 
 /* A common multiple of the positive integers A and B.  Ideally this

=== modified file 'src/bytecode.c'
--- a/src/bytecode.c    2013-03-10 21:46:55 +0000
+++ b/src/bytecode.c    2013-03-13 07:27:34 +0000
@@ -755,7 +755,6 @@
              {
                BEFORE_POTENTIAL_GC ();
                wrong_type_argument (Qlistp, v1);
-               AFTER_POTENTIAL_GC ();
              }
            NEXT;
          }
@@ -790,7 +789,6 @@
              {
                BEFORE_POTENTIAL_GC ();
                wrong_type_argument (Qlistp, v1);
-               AFTER_POTENTIAL_GC ();
              }
            NEXT;
          }

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2013-03-10 17:28:04 +0000
+++ b/src/dispnew.c     2013-03-13 07:27:34 +0000
@@ -6100,10 +6100,7 @@
 
   /* If no window system has been specified, try to use the terminal.  */
   if (! isatty (0))
-    {
-      fatal ("standard input is not a tty");
-      exit (1);
-    }
+    fatal ("standard input is not a tty");
 
 #ifdef WINDOWSNT
   terminal_type = "w32console";

=== modified file 'src/eval.c'
--- a/src/eval.c        2013-02-25 16:05:49 +0000
+++ b/src/eval.c        2013-03-13 07:27:34 +0000
@@ -1690,7 +1690,6 @@
   va_list ap;
   va_start (ap, m);
   verror (m, ap);
-  va_end (ap);
 }
 
 DEFUN ("commandp", Fcommandp, Scommandp, 1, 2, 0,

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2013-03-07 03:01:17 +0000
+++ b/src/fileio.c      2013-03-13 07:27:34 +0000
@@ -1850,9 +1850,6 @@
   error ("Missing \"}\" in environment-variable substitution");
  badvar:
   error ("Substituting nonexistent environment variable \"%s\"", target);
-
-  /* NOTREACHED */
-  return Qnil;
 }
 
 /* A slightly faster and more convenient way to get
@@ -3305,7 +3302,6 @@
           return Qnil;
 #endif
         report_file_error ("Setting file times", Fcons (absname, Qnil));
-        return Qnil;
       }
   }
 

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2013-03-11 01:17:40 +0000
+++ b/src/keyboard.c    2013-03-13 07:27:34 +0000
@@ -6552,10 +6552,7 @@
   else if (SYMBOLP (base))
     return apply_modifiers (modifiers, base);
   else
-    {
-      error ("Invalid base event");
-      return Qnil;
-    }
+    error ("Invalid base event");
 }
 
 /* Try to recognize SYMBOL as a modifier name.

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2013-02-11 19:21:23 +0000
+++ b/src/keymap.c      2013-03-13 07:27:34 +0000
@@ -565,7 +565,8 @@
 {
   if (!NILP (val))
     {
-      map_keymap_function_t fun = XSAVE_POINTER (args, 0);
+      map_keymap_function_t fun
+       = (map_keymap_function_t) XSAVE_POINTER (args, 0);
       /* If the key is a range, make a copy since map_char_table modifies
         it in place.  */
       if (CONSP (key))
@@ -2310,7 +2311,6 @@
     return Fcopy_sequence (key);
   else
     error ("KEY must be an integer, cons, symbol, or string");
-  return Qnil;
 }
 
 static char *

=== modified file 'src/term.c'
--- a/src/term.c        2013-03-11 01:17:40 +0000
+++ b/src/term.c        2013-03-13 07:27:34 +0000
@@ -3426,9 +3426,6 @@
     vfatal (str2, ap);
   else
     verror (str1, ap);
-
-  va_end (ap);
-  emacs_abort ();
 }
 
 void
@@ -3437,7 +3434,6 @@
   va_list ap;
   va_start (ap, str);
   vfatal (str, ap);
-  va_end (ap);
 }
 
 

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2013-03-10 17:28:04 +0000
+++ b/src/xfns.c        2013-03-13 07:27:34 +0000
@@ -3769,7 +3769,6 @@
 
     default:
       error ("Strange value for BackingStore parameter of screen");
-      result = Qnil;
     }
 
   return result;
@@ -3811,7 +3810,6 @@
       break;
     default:
       error ("Display has an unknown visual class");
-      result = Qnil;
     }
 
   return result;

=== modified file 'src/xsmfns.c'
--- a/src/xsmfns.c      2013-01-01 09:11:05 +0000
+++ b/src/xsmfns.c      2013-03-13 07:27:34 +0000
@@ -514,9 +514,11 @@
          prevent.  Fix this in next version.  */
       Fkill_emacs (Qnil);
 
+#if 0
       /* This will not be reached, but we want kill-emacs-hook to be run.  */
       SmcCloseConnection (smc_conn, 0, 0);
       ice_connection_closed ();
+#endif
     }
 
   return Qnil;


reply via email to

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