[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Missing return value in enable_hostname_completion

From: schwab
Subject: Missing return value in enable_hostname_completion
Date: Thu, 16 Sep 2004 00:05:20 +0200 (CEST)

Configuration Information [Automatically generated, do not change]:
Machine: ia64
OS: linux
Compiler: gcc -I/usr/src/packages/BUILD/bash-3.0 
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='ia64' 
-DCONF_OSTYPE='linux' -DCONF_MACHTYPE='ia64-suse-linux' -DCONF_VENDOR='suse' 
-DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H  -I.  
-I. -I./include -I./lib   -O2 -fmessage-length=0 -Wall -D_GNU_SOURCE -Wall 
-pipe -g -fbranch-probabilities
uname output: Linux sykes 2.6.5-22-default #1 SMP Fri Jul 2 13:43:23 UTC 2004 
ia64 ia64 ia64 GNU/Linux
Machine Type: ia64-suse-linux

Bash Version: 3.0
Patch Level: 0
Release Status: release

Missing return value causes compilation warning, although the return value
is never used anyway, so this function should probably be changed to
return void, expect that the API in shopt.def requires int as return type
which is ignored as well.

--- bashline.c  2004/09/15 21:44:43     1.13
+++ bashline.c  2004/09/15 21:44:57
@@ -292,7 +292,7 @@ enable_hostname_completion (on_or_off)
       /* See if we have anything to do. */
       at = strchr (rl_completer_word_break_characters, '@');
       if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
-        return;
+        return old_value;
       /* We have something to do.  Do it. */
       nval = (char *)xmalloc (strlen (rl_completer_word_break_characters) + 1 
+ on_or_off);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]