Description of Problem: Hello there, I just tried to compile package which-2.14-1 from Redhat 8.0. Here are some of the compiler messages. tilde.c:185: warning: suggest parentheses around assignment used as truth value which.c:554: warning: implicit declaration of function `isspace' which.c:539: warning: `function_start_version_205b' might be used uninitialized in this function Here is a patch which fixes the message. *** ./tilde/tilde.c.old 2002-11-06 11:58:05.000000000 +0000 --- ./tilde/tilde.c 2002-11-06 12:00:09.000000000 +0000 *************** *** 182,188 **** int result_size, result_index; result_index = result_size = 0; ! if (result = strchr (string, '~')) result = xmalloc (result_size = (strlen (string) + 16)); else result = xmalloc (result_size = (strlen (string) + 1)); --- 182,188 ---- int result_size, result_index; result_index = result_size = 0; ! if ((result = strchr (string, '~')) != 0) result = xmalloc (result_size = (strlen (string) + 16)); else result = xmalloc (result_size = (strlen (string) + 1)); *** ./which.c.old 2002-11-06 12:00:28.000000000 +0000 --- ./which.c 2002-11-06 12:01:38.000000000 +0000 *************** *** 22,27 **** --- 22,28 ---- #include "getopt.h" #include "tilde/tilde.h" #include "bash.h" + #include <ctype.h> static const char *progname; *************** *** 536,542 **** while (fgets(buf, sizeof(buf), stdin)) { int looks_like_function_start = 0; ! int function_start_version_205b; if (read_functions) { // bash version 2.0.5a and older output a pattern for `str' like --- 537,543 ---- while (fgets(buf, sizeof(buf), stdin)) { int looks_like_function_start = 0; ! int function_start_version_205b = 0; if (read_functions) { // bash version 2.0.5a and older output a pattern for `str' like Version-Release number of selected component (if applicable): How Reproducible: Steps to Reproduce: 1. 2. 3. Actual Results: Expected Results: Additional Information:
it's fixed in which-2.14-3. thanks for your patch file