Browse Source

Fix compile time error building windmc, detected by gcc 11.

PR 26698
	* windmc.c (mc_unify_path): Fix typo checking character at end of
	pathname.
users/ARM/morello-binutils-gdb-master
Nick Clifton 6 years ago
parent
commit
1f1845d435
  1. 6
      binutils/ChangeLog
  2. 2
      binutils/windmc.c

6
binutils/ChangeLog

@ -1,3 +1,9 @@
2020-10-05 Nick Clifton <nickc@redhat.com>
PR 26698
* windmc.c (mc_unify_path): Fix typo checking character at end of
pathname.
2020-10-05 Samanta Navarro <ferivoz@riseup.net>
* doc/binutils.texi: Fix spelling mistakes.

2
binutils/windmc.c

@ -924,7 +924,7 @@ mc_unify_path (const char *path)
hsz = xmalloc (strlen (path) + 2);
strcpy (hsz, path);
end = hsz + strlen (hsz);
if (hsz[-1] != '/' && hsz[-1] != '\\')
if (end[-1] != '/' && end[-1] != '\\')
strcpy (end, "/");
while ((end = strchr (hsz, '\\')) != NULL)
*end = '/';

Loading…
Cancel
Save