Shut set but unused warnings.
authorNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 6 Dec 2015 21:02:46 +0000 (16:02 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 6 Dec 2015 21:02:46 +0000 (16:02 -0500)
These are in the code for debug/inspection purposes.

* src/ui/lwlib/xlwgauge.c (GaugeExpose): Use SXE_SET_UNUSED.

* src/ui/lwlib/xlwcheckbox.c (DrawCheck):Ditto.

* src/sysdep.c (tty_init_sys_modes_on_device)
(tty_reset_sys_modes_on_device): Ditto.

* src/regex.c (re_match_2_internal): Ditto.

* src/mule/file-coding.c (Fdefine_coding_system_alias): Ditto.

* src/media/sound-oss.c (sound_oss_handle_aj_events): Ditto.

* src/media/sound-jack.c (sound_jack_handle_aj_events)
(sound_jack_process): Ditto.

* src/media/sound-ao.c (sound_ao_handle_aj_events): Ditto.

* src/media/sound-alsa.c (sound_alsa_handle_aj_events): Ditto.

* src/media/media-sndfile.c (media_sndfile_open): Ditto.

* src/media/media-mad.c (media_mad_read): Ditto.

* src/media/media-internal.c (media_internal_analyse_stream): Ditto.

* src/emacs.c (Fdump_emacs): Ditto.

* src/bytecode.c (execute_optimized_program): Ditto.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
14 files changed:
src/bytecode.c
src/emacs.c
src/media/media-internal.c
src/media/media-mad.c
src/media/media-sndfile.c
src/media/sound-alsa.c
src/media/sound-ao.c
src/media/sound-jack.c
src/media/sound-oss.c
src/mule/file-coding.c
src/regex.c
src/sysdep.c
src/ui/lwlib/xlwcheckbox.c
src/ui/lwlib/xlwgauge.c

index 8157c82..8eb8186 100644 (file)
@@ -1049,6 +1049,8 @@ execute_optimized_program(const Opbyte *program,
                        Lisp_Object args;
 
                        orig_fun = fun = XCAR(op);
+                       SXE_SET_UNUSED(orig_fun);
+
                        args = XCDR(op);
                        if (SYMBOLP (fun) && !EQ(fun, Qunbound) &&
                            (fun = XSYMBOL(fun)->function, SYMBOLP(fun)))
index 8feec5d..04f9664 100644 (file)
@@ -3064,6 +3064,7 @@ and announce itself normally when it is run.
                garbage_collect_1();
 
 #ifdef PDUMP
+               SXE_SET_UNUSED(symfile_ext);
                pdump(filename_ext);
 #else
 
index e59193c..7ee8deb 100644 (file)
@@ -947,6 +947,8 @@ void media_internal_analyse_stream(Lisp_Media_Stream *ms)
                mkfp = media_stream_kind_properties(ms).fprops;
                TO_EXTERNAL_FORMAT(LISP_STRING, mkfp->filename,
                                   ALLOCA, (file, file_len), Qnil);
+               SXE_SET_UNUSED(file_len);
+
                if (file == NULL || (fd = open(file, O_RDONLY, 0)) < 0) {
                        xfree(data);
                        return;
index ba2101c..58ff625 100644 (file)
@@ -299,6 +299,7 @@ media_mad_read(media_substream *mss, void *outbuf, size_t length)
 
        /* fetch framesize */
        framesize = mtap->framesize;
+       SXE_SET_UNUSED(framesize);
 
        /* prepare mad */
        mads = madd->stream;
index e819126..05dc2e0 100644 (file)
@@ -105,6 +105,8 @@ media_sndfile_open(Lisp_Media_Stream *ms)
                mkfp = media_stream_kind_properties(ms).fprops;
                TO_EXTERNAL_FORMAT(LISP_STRING, mkfp->filename,
                                   ALLOCA, (file, file_len), Qnil);
+               SXE_SET_UNUSED(file_len);
+
                if ( file != NULL ) {
                        sf = sf_open(file, SFM_READ, sfinfo);
                }
index c887ef0..1428f1e 100644 (file)
@@ -275,6 +275,8 @@ sound_alsa_handle_aj_events(audio_job_t aj)
 
        SXE_MUTEX_LOCK(&aj->mtx);
        sasd = audio_job_device_data(aj);
+       SXE_SET_UNUSED(sasd);
+
        if ((ev = eq_noseeum_dequeue(audio_job_queue(aj))) == NULL) {
                SXE_MUTEX_UNLOCK(&aj->mtx);
                return;
index eb6ad12..1a4e2cd 100644 (file)
@@ -253,6 +253,8 @@ sound_ao_handle_aj_events(audio_job_t aj)
 
        SXE_MUTEX_LOCK(&aj->mtx);
        sasd = audio_job_device_data(aj);
+       SXE_SET_UNUSED(sasd);
+
        if ((ev = eq_noseeum_dequeue(audio_job_queue(aj))) == NULL) {
                SXE_MUTEX_UNLOCK(&aj->mtx);
                return;
index 9fd116a..3cd1194 100644 (file)
@@ -446,6 +446,8 @@ sound_jack_handle_aj_events(audio_job_t aj)
 
        SXE_MUTEX_LOCK(&aj->mtx);
        sasd = audio_job_device_data(aj);
+       SXE_SET_UNUSED(sasd);
+
        if ((ev = eq_noseeum_dequeue(audio_job_queue(aj))) == NULL) {
                SXE_MUTEX_UNLOCK(&aj->mtx);
                return;
@@ -495,8 +497,11 @@ sound_jack_process(jack_nframes_t nframes, void *userdata)
        aj = userdata;
        SXE_MUTEX_LOCK(&aj->mtx);
        mss = aj->substream;
+       SXE_SET_UNUSED(mss);
+
        sjsd = audio_job_device_data(aj);
        buffer = aj->buffer;
+       SXE_SET_UNUSED(buffer);
 
 #ifdef EF_USE_ASYNEQ
        /* stuff on the event queue? */
index 253a391..42014ba 100644 (file)
@@ -363,6 +363,8 @@ sound_oss_handle_aj_events(audio_job_t aj)
 
        SXE_MUTEX_LOCK(&aj->mtx);
        sasd = audio_job_device_data(aj);
+       SXE_SET_UNUSED(sasd);
+
        if ((ev = eq_noseeum_dequeue(audio_job_queue(aj))) == NULL) {
                SXE_MUTEX_UNLOCK(&aj->mtx);
                return;
index 90b7dc7..ce640a1 100644 (file)
@@ -1228,6 +1228,7 @@ and `coding-system-canonical-name-p'.
 
        /* Checks that aliasee names a coding-system */
        real_coding_system = Fget_coding_system(aliasee);
+       SXE_SET_UNUSED(real_coding_system);
 
        /* Check for coding system alias loops */
        if (EQ(alias, aliasee))
index 6f9fb9c..2f7f8be 100644 (file)
@@ -83,6 +83,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 # undef REL_ALLOC
 #endif
 
+#include "sxe-utils.h"
+
 /* The `emacs' switch turns on certain matching commands
    that make sense only in Emacs. */
 #ifdef emacs
@@ -5855,6 +5857,7 @@ re_match_2_internal(struct re_pattern_buffer *bufp, re_char * string1,
                                          dummy_low_reg, dummy_high_reg,
                                          reg_dummy, reg_dummy,
                                          reg_info_dummy);
+                        SXE_SET_UNUSED(pdummy), SXE_SET_UNUSED(sdummy);
                }
                        /* Note fall through.  */
 
index 7ffad2f..0828973 100644 (file)
@@ -1371,6 +1371,7 @@ static void tty_init_sys_modes_on_device(struct device *d)
 
        input_fd = CONSOLE_TTY_DATA(con)->infd;
        output_fd = CONSOLE_TTY_DATA(con)->outfd;
+       SXE_SET_UNUSED(output_fd);
 
        emacs_get_tty(input_fd, &CONSOLE_TTY_DATA(con)->old_tty);
        tty = CONSOLE_TTY_DATA(con)->old_tty;
@@ -1725,6 +1726,7 @@ static void tty_reset_sys_modes_on_device(struct device *d)
 
        input_fd = CONSOLE_TTY_DATA(con)->infd;
        output_fd = CONSOLE_TTY_DATA(con)->outfd;
+       SXE_SET_UNUSED(output_fd);
 
 #if defined (IBMR2AIX) && defined (AIXHFT)
        {
index 758799a..56b5b75 100644 (file)
@@ -39,6 +39,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 #include "ui/X11/xmu.h"
 #include "xlwcheckboxP.h"
 
+#include "sxe-utils.h"
+
 /* by using the same size for the checkbox as for the diamond box,
  * we can let the Radio widget do the vast majority of the work.
  */
@@ -392,6 +394,7 @@ static void DrawCheck(Widget w)
        pts[5].y = -s;
        XFillPolygon(dpy, win, bot, pts, 6, Nonconvex, CoordModePrevious);
 #else
+       SXE_SET_UNUSED(bw);
        XDrawRectangle(dpy, win, gc, bx + s, by + s, bsz, bsz);
 #endif
 
index 07dbebc..4e1e5ec 100644 (file)
@@ -380,6 +380,8 @@ static void GaugeExpose(Widget w, XEvent * event, Region region)
                hgt = gw->core.width;
        }
 
+       SXE_SET_UNUSED(hgt);
+
        /* if the gauge is selected, signify by drawing the background
         * in a contrasting color.
         */