From: Harald Anlauf Date: Sun, 7 Jun 2020 14:43:12 +0000 (+0200) Subject: PR fortran/95091 - Buffer overflows with submodules and long symbols X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5aaccde3db39fac7e7f6677ceccc1eadd9c6a424;p=gcc.git PR fortran/95091 - Buffer overflows with submodules and long symbols Add cast to fix bootstrap error with -Werror=sign-compare. gcc/fortran/ PR fortran/95091 * class.c (gfc_hash_value): Add cast. --- diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index 8bb73502f5d..2b55859ce75 100644 --- 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];