]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
syswrap-linux.c (sys_execveat): Define path as const HChar *
authorMark Wielaard <mark@klomp.org>
Thu, 9 Jun 2022 21:06:36 +0000 (23:06 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 9 Jun 2022 21:10:30 +0000 (23:10 +0200)
Like buf, path (ARG2) is a const HChar *
Prevents a gcc warning: assignment discards 'const' qualifier from
                        pointer target type [-Wdiscarded-qualifiers]
13328 |                        path = buf;
      |                             ^

coregrind/m_syswrap/syswrap-linux.c

index 04502f62574b35e4fc4ed4c2a893c2b093ed5911..adc3132118baaf7393ceba03d5eb2418e5e203c7 100644 (file)
@@ -13302,7 +13302,7 @@ PRE(sys_execveat)
    return;
 #endif
 
-   char *path = (char*) ARG2;
+   const HChar *path = (const HChar*) ARG2;
    Addr arg_2    = ARG3;
    Addr arg_3    = ARG4;
    const HChar   *buf;