From 325dfdae13bdc0653fe04b746326a1518ee18ff1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 15 Oct 2017 19:20:58 +0300 Subject: [PATCH] Avoid compilation warnings in optimized builds * src/process.c (Fmake_network_process): * src/image.c (xbm_scan, gif_load): * src/fileio.c (Frename_file): * src/data.c (Fmake_local_variable): * src/buffer.c (fix_start_end_in_overlays): * lib-src/etags.c (process_file_name): Mark variables with UNINIT to avoid compiler warnings in optimized builds. --- lib-src/etags.c | 2 +- src/buffer.c | 4 ++-- src/data.c | 2 +- src/fileio.c | 2 +- src/image.c | 4 ++-- src/process.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index 009cba528d7..cc7631f647e 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1530,7 +1530,7 @@ process_file_name (char *file, language *lang) fdesc *fdp; compressor *compr; char *compressed_name, *uncompressed_name; - char *ext, *real_name UNINIT, *tmp_name; + char *ext, *real_name UNINIT, *tmp_name UNINIT; int retval; canonicalize_filename (file); diff --git a/src/buffer.c b/src/buffer.c index cc6021bfb5d..1c8b4635086 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3616,8 +3616,8 @@ void fix_start_end_in_overlays (register ptrdiff_t start, register ptrdiff_t end) { Lisp_Object overlay; - struct Lisp_Overlay *before_list; - struct Lisp_Overlay *after_list; + struct Lisp_Overlay *before_list UNINIT; + struct Lisp_Overlay *after_list UNINIT; /* These are either nil, indicating that before_list or after_list should be assigned, or the cons cell the cdr of which should be assigned. */ diff --git a/src/data.c b/src/data.c index e070be6c208..ef7210fbfa0 100644 --- a/src/data.c +++ b/src/data.c @@ -1888,7 +1888,7 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) (Lisp_Object variable) { Lisp_Object tem; - bool forwarded; + bool forwarded UNINIT; union Lisp_Val_Fwd valcontents; struct Lisp_Symbol *sym; struct Lisp_Buffer_Local_Value *blv = NULL; diff --git a/src/fileio.c b/src/fileio.c index e57bf46015c..b7df38c8570 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2296,7 +2296,7 @@ This is what happens in interactive use with M-x. */) bool plain_rename = (case_only_rename || (!NILP (ok_if_already_exists) && !INTEGERP (ok_if_already_exists))); - int rename_errno; + int rename_errno UNINIT; if (!plain_rename) { if (renameat_noreplace (AT_FDCWD, SSDATA (encoded_file), diff --git a/src/image.c b/src/image.c index 3dac7086cb4..cd4901b3d4f 100644 --- a/src/image.c +++ b/src/image.c @@ -2574,7 +2574,7 @@ xbm_image_p (Lisp_Object object) static int xbm_scan (char **s, char *end, char *sval, int *ival) { - unsigned char c; + unsigned char c UNINIT; loop: @@ -7839,7 +7839,7 @@ gif_load (struct frame *f, struct image *img) init_color_table (); #ifndef USE_CAIRO - unsigned long bgcolor; + unsigned long bgcolor UNINIT; if (STRINGP (specified_bg)) bgcolor = x_alloc_image_color (f, img, specified_bg, FRAME_BACKGROUND_PIXEL (f)); diff --git a/src/process.c b/src/process.c index 05feba73253..943cb2a1048 100644 --- a/src/process.c +++ b/src/process.c @@ -3830,7 +3830,7 @@ usage: (make-network-process &rest ARGS) */) Lisp_Object proc; Lisp_Object contact; struct Lisp_Process *p; - const char *portstring; + const char *portstring UNINIT; ptrdiff_t portstringlen ATTRIBUTE_UNUSED; char portbuf[INT_BUFSIZE_BOUND (EMACS_INT)]; #ifdef HAVE_LOCAL_SOCKETS -- 2.39.5