From: Lancelot Six Date: Mon, 11 Sep 2023 14:54:59 +0000 (+0000) Subject: gdb/testsuite/rocm: fix rocm-multi-inferior-gpu.cpp X-Git-Tag: gdb-14-branchpoint~267 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa240fbd480651bd72b3cebe7b5ea1cda204b7e9;p=thirdparty%2Fbinutils-gdb.git gdb/testsuite/rocm: fix rocm-multi-inferior-gpu.cpp The gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp testcase contains a call to execl which does not have NULL as a last argument. This is an invalid use of execl. This patch fixes this oversight. Change-Id: I03b60abe30468d71ba5089b240c6d00f9b8883b2 Approved-By: Tom Tromey --- diff --git a/gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp b/gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp index ca869233b58..d64afdd1994 100644 --- a/gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp +++ b/gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp @@ -62,7 +62,7 @@ parent (int argc, char **argv) if (pid == 0) { /* Exec to force the child to re-initialize the ROCm runtime. */ - if (execl (argv[0], argv[0], n) == -1) + if (execl (argv[0], argv[0], n, nullptr) == -1) { perror ("Failed to exec"); return -1;