* Fix indentation issue and reorganize last commit entry

so that it is shorter than 80.
  peXXigen.c (rsrc_cmp): Fix unused variable warning.
This commit is contained in:
Pierre Muller
2013-12-19 14:00:11 +01:00
parent 12e8c7d7c2
commit 3f10b67a59
2 changed files with 24 additions and 19 deletions

View File

@ -1,7 +1,11 @@
2013-12-19 Pierre Muller <muller@sourceware.org> 2013-12-19 Pierre Muller <muller@sourceware.org>
* peXXigen.c (u16_mbtouc): Avoid unused function warning by excluding if * peXXigen.c (rsrc_cmp): Fix unused variable warning.
__CYGWIN__ or __MINGW32__ macro is defined.
2013-12-19 Pierre Muller <muller@sourceware.org>
* peXXigen.c (u16_mbtouc): Avoid unused function warning by excluding
if __CYGWIN__ or __MINGW32__ macro is defined.
(rsrc_cmp): Fix Windows host version and version without wchar header. (rsrc_cmp): Fix Windows host version and version without wchar header.
[__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro. [__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro.
Fix coding standard issues. Fix coding standard issues.

View File

@ -2981,7 +2981,6 @@ static signed int
rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
{ {
signed int res; signed int res;
unsigned int i;
bfd_byte * astring; bfd_byte * astring;
unsigned int alen; unsigned int alen;
bfd_byte * bstring; bfd_byte * bstring;
@ -3013,6 +3012,8 @@ rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
min (alen, blen)); min (alen, blen));
#elif defined HAVE_WCHAR_H #elif defined HAVE_WCHAR_H
{
unsigned int i;
res = 0; res = 0;
for (i = min (alen, blen); i--; astring += 2, bstring += 2) for (i = min (alen, blen); i--; astring += 2, bstring += 2)
{ {
@ -3030,7 +3031,7 @@ rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
if (res) if (res)
break; break;
} }
}
#else #else
/* Do the best we can - a case sensitive, untranslated comparison. */ /* Do the best we can - a case sensitive, untranslated comparison. */
res = memcmp (astring, bstring, min (alen, blen) * 2); res = memcmp (astring, bstring, min (alen, blen) * 2);