]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix up "missing braces" warning.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 20 Jul 2010 15:26:53 +0000 (17:26 +0200)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 20 Jul 2010 15:26:53 +0000 (17:26 +0200)
* src/eval.c (Feval, Ffuncall): Use the new names.
* src/lisp.h (struct Lisp_Subr): Rename `am' to aMANY and add aUNEVALLED.
(DEFUN): Add braces around the union initialisation and use ## to
specify the right union alternative and avoid a cast.

src/ChangeLog
src/eval.c
src/lisp.h

index 43b4c08dd23a21fd86ef8947142ab42cac4c79bc..81b4560e06d511dceb991a0f539719e041903aad 100644 (file)
@@ -1,3 +1,11 @@
+2010-07-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * eval.c (Feval, Ffuncall): Use the new names.
+
+       * lisp.h (struct Lisp_Subr): Rename `am' to aMANY and add aUNEVALLED.
+       (DEFUN): Add braces around the union initialisation and use ## to
+       specify the right union alternative and avoid a cast.
+
 2010-07-18  Juanma Barranquero  <lekktu@gmail.com>
 
        * makefile.w32-in ($(BLD)/keyboard.$(O)): Update dependencies.
index 953a41e4b1eb701dd77457450520f1135ebd1e71..06888ca0dd486d24c00ab8db2c0a4ef167a13604 100644 (file)
@@ -2299,7 +2299,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
       if (XSUBR (fun)->max_args == UNEVALLED)
        {
          backtrace.evalargs = 0;
-         val = (XSUBR (fun)->function.a1) (args_left);
+         val = (XSUBR (fun)->function.aUNEVALLED) (args_left);
          goto done;
        }
 
@@ -2325,7 +2325,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
          backtrace.args = vals;
          backtrace.nargs = XINT (numargs);
 
-         val = (XSUBR (fun)->function.am) (XINT (numargs), vals);
+         val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals);
          UNGCPRO;
          goto done;
        }
@@ -2968,7 +2968,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS)  */)
 
       if (XSUBR (fun)->max_args == MANY)
        {
-         val = (XSUBR (fun)->function.am) (numargs, args + 1);
+         val = (XSUBR (fun)->function.aMANY) (numargs, args + 1);
          goto done;
        }
 
index 3ec2ed07ed978f1927295d8ac9f0c147ea693f85..d1a14fcd8948de855c5a9ba39000d7eec3f69960 100644 (file)
@@ -971,7 +971,8 @@ struct Lisp_Subr
       Lisp_Object (*a6) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
       Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
       Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
-      Lisp_Object (*am) (int, Lisp_Object *);
+      Lisp_Object (*aUNEVALLED) (Lisp_Object args);
+      Lisp_Object (*aMANY) (int, Lisp_Object *);
     } function;
     short min_args, max_args;
     const char *symbol_name;
@@ -1775,7 +1776,8 @@ typedef struct {
   Lisp_Object fnname DEFUN_ARGS_ ## maxargs ;                          \
   DECL_ALIGN (struct Lisp_Subr, sname) =                               \
     { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)),    \
-      (Lisp_Object(*)(void)) fnname, minargs, maxargs, lname, intspec, 0}; \
+      { .a ## maxargs = fnname },                              \
+      minargs, maxargs, lname, intspec, 0};                            \
   Lisp_Object fnname
 
 /* Note that the weird token-substitution semantics of ANSI C makes