mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-24 07:47:41 +08:00
avoid assignment inside if condition (dictionary.c)
This change gets rid of an ARI warning which was recently introduced by one of our changes. gdb/ChangeLog: * dictionary.c (dict_hash): Move assignment out of if condition.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2010-10-26 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* dictionary.c (dict_hash): Move assignment out of if condition.
|
||||||
|
|
||||||
2010-10-22 Jie Zhang <jie@codesourcery.com>
|
2010-10-22 Jie Zhang <jie@codesourcery.com>
|
||||||
|
|
||||||
* Makefile.in (install): Remove dependency of install-only and
|
* Makefile.in (install): Remove dependency of install-only and
|
||||||
|
@ -798,7 +798,6 @@ dict_hash (const char *string0)
|
|||||||
|
|
||||||
const char *string;
|
const char *string;
|
||||||
unsigned int hash;
|
unsigned int hash;
|
||||||
int c;
|
|
||||||
|
|
||||||
string = string0;
|
string = string0;
|
||||||
if (*string == '_')
|
if (*string == '_')
|
||||||
@ -827,7 +826,9 @@ dict_hash (const char *string0)
|
|||||||
case '_':
|
case '_':
|
||||||
if (string[1] == '_' && string != string0)
|
if (string[1] == '_' && string != string0)
|
||||||
{
|
{
|
||||||
if (((c = string[2]) < 'a' || c > 'z') && c != 'O')
|
int c = string[2];
|
||||||
|
|
||||||
|
if ((c < 'a' || c > 'z') && c != 'O')
|
||||||
return hash;
|
return hash;
|
||||||
hash = 0;
|
hash = 0;
|
||||||
string += 2;
|
string += 2;
|
||||||
|
Reference in New Issue
Block a user