From 244fb0defd643f836aa3464edfcbb96ad3676d50 Mon Sep 17 00:00:00 2001 From: Jason Tang Date: Mon, 22 Nov 2021 15:51:28 -0500 Subject: [PATCH] SWDEV-1 - Fix getopt for options that don't have colon Change-Id: Ibb8907e23294bfa033bdefb243ddac35574983b0 [ROCm/clr commit: aba8b087019fb1dc5e6f282bd79c86ace0b69999] --- projects/clr/opencl/tests/ocltst/env/getopt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/clr/opencl/tests/ocltst/env/getopt.cpp b/projects/clr/opencl/tests/ocltst/env/getopt.cpp index 9964b93a71..72ff9c8adb 100644 --- a/projects/clr/opencl/tests/ocltst/env/getopt.cpp +++ b/projects/clr/opencl/tests/ocltst/env/getopt.cpp @@ -42,7 +42,8 @@ int getopt(int argc, char *const argv[], const char *optstring) { return '?'; } optarg = argv[optind]; - optind++; } + + optind++; return opt; }