Quiesce warnings regarding assignement of loop conditionals by implementing

the solution from the compiler to wrap the statement in parens.
This commit is contained in:
Sean Bruno 2013-10-29 20:53:09 +00:00
parent a5c296c5c5
commit dde0bbff1f
6 changed files with 11 additions and 11 deletions

View File

@ -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;

View File

@ -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)))

View File

@ -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)

View File

@ -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;

View File

@ -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. */

View File

@ -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));