projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
761306f
)
PR fortran/95091 - Buffer overflows with submodules and long symbols
author
Harald Anlauf
<anlauf@gmx.de>
Sun, 7 Jun 2020 14:43:12 +0000
(16:43 +0200)
committer
Harald Anlauf
<anlauf@gmx.de>
Sun, 7 Jun 2020 14:43:12 +0000
(16:43 +0200)
Add cast to fix bootstrap error with -Werror=sign-compare.
gcc/fortran/
PR fortran/95091
* class.c (gfc_hash_value): Add cast.
gcc/fortran/class.c
patch
|
blob
|
history
diff --git
a/gcc/fortran/class.c
b/gcc/fortran/class.c
index 8bb73502f5d98ceb7da25fb1c3f9fadb7b092ead..2b55859ce7536f83bcd2299ba8f59bd9530c879f 100644
(file)
--- a/
gcc/fortran/class.c
+++ b/
gcc/fortran/class.c
@@
-540,7
+540,7
@@
gfc_hash_value (gfc_symbol *sym)
get_unique_type_string (&c[0], sym);
len = strnlen (c, sizeof (c));
- gcc_assert (len < sizeof (c));
+ gcc_assert (
(size_t)
len < sizeof (c));
for (i = 0; i < len; i++)
hash = (hash << 6) + (hash << 16) - hash + c[i];