Coverity fixes
authorNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 2 Oct 2011 21:26:45 +0000 (17:26 -0400)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 2 Oct 2011 21:26:45 +0000 (17:26 -0400)
* src/lisp.h (PRIVATE_EXTERNAL_LIST_LOOP_6): silence value
computed not used warning.
* src/lisp.h: add prototypes for write_hex_ptr, write_fmt_str and
write_fmt_sting.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/lisp.h

index b3d2122..148c463 100644 (file)
@@ -641,9 +641,9 @@ PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, tail,                 \
                                     tortoise, suspicion_length)        \
   for (tortoise = hare = list, len = 0;                                        \
                                                                        \
-       (CONSP (hare) ? ((elt = XCAR (hare)), 1) :                      \
+       (CONSP (hare) ? ((void)(elt = XCAR (hare)), 1) :                        \
        (NILP (hare) ? 0 :                                              \
-        (signal_malformed_list_error (list), 0)));                     \
+        ((void)signal_malformed_list_error (list), 0)));               \
                                                                        \
        hare = XCDR (hare),                                             \
         (void)                                                         \
@@ -3254,6 +3254,9 @@ void temp_output_buffer_show(Lisp_Object, Lisp_Object);
  * Note: stream should be defaulted before calling
  *  (eg Qnil means stdout, not Vstandard_output, etc) */
 void write_c_string(const char *, Lisp_Object);
+void write_hex_ptr(void*, Lisp_Object);
+int write_fmt_str(Lisp_Object,const char *,...) PRINTF_ARGS(2, 3);
+int write_fmt_string(Lisp_Object,const char *,...) PRINTF_ARGS(2, 3);
 /* Same goes for this function. */
 void write_string_1(const Bufbyte *, Bytecount, Lisp_Object);
 void print_cons(Lisp_Object, Lisp_Object, int);