Use conformant main() signature for CTS suite
authorMichael Chock <mchock@nvidia.com>
Sat, 12 Nov 2016 00:11:31 +0000 (16:11 -0800)
committerPyry Haulos <phaulos@google.com>
Mon, 14 Nov 2016 16:15:06 +0000 (12:15 -0400)
C++ requires compilers to accept at least two signatures (3.6.1 in the
2014 and 2017 working drafts):

- a function of () returning int and
- a function of (int, pointer to pointer to char) returning int

There is no guarantee that a compiler will accept variations of argv
that use const. Use the second required form.

See #534.

Change-Id: I212b00e82b927fe25c5b2b20134db472c08e4c17

framework/platform/tcuMain.cpp

index 58c92f3..5b0ccb0 100644 (file)
@@ -34,7 +34,7 @@
 // Implement this in your platform port.
 tcu::Platform* createPlatform (void);
 
-int main (int argc, const char* argv[])
+int main (int argc, char** argv)
 {
 #if (DE_OS != DE_OS_WIN32)
        // Set stdout to line-buffered mode (will be fully buffered by default if stdout is pipe).