SWDEV-301289 - Correctly reset optind when using getopt()
optind's starting value is 1 and it needs to be reset to 1 after each
getopt() invocation. Resetting it to 0 will cause getopt() to
reinitialize its internal state. This is only needed for some corner
cases. In our current usage, we should be resetting it to 1.
Change-Id: I68da7e41ee8b83b275e2a7bd660c13af569769f1
[ROCm/clr commit: 3d82092632]
Этот коммит содержится в:
коммит произвёл
Jason Tang
родитель
99cd3788c4
Коммит
7757615404
поставляемый
+1
-1
@@ -1459,7 +1459,7 @@ int main(int argc, char** argv) {
|
||||
unsigned int platform = 0;
|
||||
platform = parseCommandLineForPlatform(argc, argv);
|
||||
// reset optind as we really didn't parse the full command line
|
||||
optind = 0;
|
||||
optind = 1;
|
||||
App app(platform);
|
||||
#ifdef ATI_OS_WIN
|
||||
// this function is registers windows service routine when ocltst is launched
|
||||
|
||||
Ссылка в новой задаче
Block a user