summaryrefslogtreecommitdiffstats
path: root/contrib/libreadline
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2013-10-29 20:53:09 +0000
committersbruno <sbruno@FreeBSD.org>2013-10-29 20:53:09 +0000
commitb782e38fec87b1049fbbe23bec12f57438d79dc0 (patch)
treedd21945b4edf355ab810f8caca0b826a2fc27929 /contrib/libreadline
parent6dbec20d9c93ee6ad5183ae5cba3f6a788fe958f (diff)
downloadFreeBSD-src-b782e38fec87b1049fbbe23bec12f57438d79dc0.zip
FreeBSD-src-b782e38fec87b1049fbbe23bec12f57438d79dc0.tar.gz
Quiesce warnings regarding assignement of loop conditionals by implementing
the solution from the compiler to wrap the statement in parens.
Diffstat (limited to 'contrib/libreadline')
-rw-r--r--contrib/libreadline/bind.c8
-rw-r--r--contrib/libreadline/complete.c6
-rw-r--r--contrib/libreadline/histexpand.c2
-rw-r--r--contrib/libreadline/history.c2
-rw-r--r--contrib/libreadline/input.c2
-rw-r--r--contrib/libreadline/tilde.c2
6 files changed, 11 insertions, 11 deletions
diff --git a/contrib/libreadline/bind.c b/contrib/libreadline/bind.c
index 08c906b..2330a58 100644
--- a/contrib/libreadline/bind.c
+++ b/contrib/libreadline/bind.c
@@ -442,7 +442,7 @@ rl_translate_keyseq (seq, array, len)
{
register int i, c, l, temp;
- for (i = l = 0; c = seq[i]; i++)
+ for (i = l = 0; (c = seq[i]); i++)
{
if (c == '\\')
{
@@ -1185,7 +1185,7 @@ rl_parse_and_bind (string)
{
int passc = 0;
- for (i = 1; c = string[i]; i++)
+ for (i = 1; (c = string[i]); i++)
{
if (passc)
{
@@ -1276,7 +1276,7 @@ rl_parse_and_bind (string)
int delimiter, passc;
delimiter = string[i++];
- for (passc = 0; c = string[i]; i++)
+ for (passc = 0; (c = string[i]); i++)
{
if (passc)
{
@@ -2048,7 +2048,7 @@ rl_function_dumper (print_readably)
fprintf (rl_outstream, "\n");
- for (i = 0; name = names[i]; i++)
+ for (i = 0; (name = names[i]); i++)
{
rl_command_func_t *function;
char **invokers;
diff --git a/contrib/libreadline/complete.c b/contrib/libreadline/complete.c
index 9a930a1..b3bdc79 100644
--- a/contrib/libreadline/complete.c
+++ b/contrib/libreadline/complete.c
@@ -884,7 +884,7 @@ _rl_find_completion_word (fp, dp)
/* We didn't find an unclosed quoted substring upon which to do
completion, so use the word break characters to find the
substring on which to complete. */
- while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY))
+ while ((rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY)))
{
scan = rl_line_buffer[rl_point];
@@ -1803,7 +1803,7 @@ rl_completion_matches (text, entry_function)
match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
match_list[1] = (char *)NULL;
- while (string = (*entry_function) (text, matches))
+ while ((string = (*entry_function) (text, matches)))
{
if (matches + 1 == match_list_size)
match_list = (char **)xrealloc
@@ -1854,7 +1854,7 @@ rl_username_completion_function (text, state)
}
#if defined (HAVE_GETPWENT)
- while (entry = getpwent ())
+ while ((entry = getpwent ()))
{
/* Null usernames should result in all users as possible completions. */
if (namelen == 0 || (STREQN (username, entry->pw_name, namelen)))
diff --git a/contrib/libreadline/histexpand.c b/contrib/libreadline/histexpand.c
index f46c0b2..eae8ed2 100644
--- a/contrib/libreadline/histexpand.c
+++ b/contrib/libreadline/histexpand.c
@@ -203,7 +203,7 @@ get_history_event (string, caller_index, delimiting_quote)
}
/* Only a closing `?' or a newline delimit a substring search string. */
- for (local_index = i; c = string[i]; i++)
+ for (local_index = i; (c = string[i]); i++)
{
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
diff --git a/contrib/libreadline/history.c b/contrib/libreadline/history.c
index 1ccf4db..a1a8381 100644
--- a/contrib/libreadline/history.c
+++ b/contrib/libreadline/history.c
@@ -306,7 +306,7 @@ add_history (string)
}
}
- temp = alloc_history_entry (string, hist_inittime ());
+ temp = alloc_history_entry ((char *)string, hist_inittime ());
the_history[history_length] = (HIST_ENTRY *)NULL;
the_history[history_length - 1] = temp;
diff --git a/contrib/libreadline/input.c b/contrib/libreadline/input.c
index b91548e..85b56c9 100644
--- a/contrib/libreadline/input.c
+++ b/contrib/libreadline/input.c
@@ -428,7 +428,7 @@ rl_read_key ()
else
{
/* If input is coming from a macro, then use that. */
- if (c = _rl_next_macro_key ())
+ if ((c = _rl_next_macro_key ()))
return (c);
/* If the user has an event function, then call it periodically. */
diff --git a/contrib/libreadline/tilde.c b/contrib/libreadline/tilde.c
index 1b76c9f..b59b502 100644
--- a/contrib/libreadline/tilde.c
+++ b/contrib/libreadline/tilde.c
@@ -196,7 +196,7 @@ tilde_expand (string)
int result_size, result_index;
result_index = result_size = 0;
- if (result = strchr (string, '~'))
+ if ((result = strchr (string, '~')))
result = (char *)xmalloc (result_size = (strlen (string) + 16));
else
result = (char *)xmalloc (result_size = (strlen (string) + 1));
OpenPOWER on IntegriCloud