Re: 8.0.661: maybe-uninitialized warning in term.c in Huge build but not in Tiny build

2017-06-23 Fir de Conversatie Bram Moolenaar

Tony Mechelynck wrote:

> 8.0.661: maybe-uninitialized warning in term.c in Huge build but not
> in Tiny build
> 
> gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread
> -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0
> -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0
> -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0
> -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
> -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
> -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm
> -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
> -I/usr/include/libpng16 -I/usr/include/glib-2.0
> -I/usr/lib64/glib-2.0/include-O2 -fno-strength-reduce -Wall
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1-o objects/term.o term.c
> term.c: In function ‘check_termcode’:
> term.c:4626:10: warning: ‘modifiers_start’ may be used uninitialized
> in this function [-Wmaybe-uninitialized]
>if (p == NULL)
>   ^
> 
> FWIW, this is a gvim with GTK3 GUI on x86_64.

Looks like it just needs to be initialized to NULL.

-- 
Proof techniques #2: Proof by Oddity.
SAMPLE: To prove that horses have an infinite number of legs.
(1) Horses have an even number of legs.
(2) They have two legs in back and fore legs in front.
(3) This makes a total of six legs, which certainly is an odd number of
legs for a horse.
(4) But the only number that is both odd and even is infinity.
(5) Therefore, horses must have an infinite number of legs.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


8.0.661: maybe-uninitialized warning in term.c in Huge build but not in Tiny build

2017-06-22 Fir de Conversatie Tony Mechelynck
8.0.661: maybe-uninitialized warning in term.c in Huge build but not
in Tiny build

gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread
-I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0
-I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0
-I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0
-I/usr/include/gio-unix-2.0/ -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm
-I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/libpng16 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include-O2 -fno-strength-reduce -Wall
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1-o objects/term.o term.c
term.c: In function ‘check_termcode’:
term.c:4626:10: warning: ‘modifiers_start’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
   if (p == NULL)
  ^

FWIW, this is a gvim with GTK3 GUI on x86_64.

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: warning in term.c

2016-04-29 Fir de Conversatie Bram Moolenaar

Charles Campbell wrote:

> I'm getting a warning from term.c:
> 
>   term.c|6180 warning| ignoring return value of 'fgets', declared with
> attribute warn_unused_result
> 
> The line in question does use (void)fgets(...) so the result is
> intentionally thrown away.

Yeah, I've seen before that using (void) doesn't work.
Let's assign to ignoredp.

-- 
BEDEVERE:  Oh!
LAUNCELOT: No "Arrggghhh ... " at the back of the throat.
BEDEVERE:  No!  "Oh!" in surprise and alarm!
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


warning in term.c

2016-04-29 Fir de Conversatie Charles E Campbell
Hello:

I'm getting a warning from term.c:

  term.c|6180 warning| ignoring return value of 'fgets', declared with
attribute warn_unused_result

The line in question does use (void)fgets(...) so the result is
intentionally thrown away.

Regards,
Chip Campbell


-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.