Bug 6890

Summary: pthread-show-text.c test compile failure, invalid main()
Product: cairo Reporter: Tim Mooney <Tim.Mooney>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: minor    
Priority: low Keywords: janitor, patch
Version: 1.0.4   
Hardware: All   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:
Attachments: fix the signature for main()

Description Tim Mooney 2006-05-11 11:15:20 UTC
cairo-1.0.4/test/pthread-show-text.c has a main() with a signature that the
Solaris Studio 11 compiler chokes on:

 main (int argc, char *argv[0])

note that argv is given with a 0 dimension.  The trivial patch is attached
Comment 1 Tim Mooney 2006-05-11 11:16:38 UTC
Created attachment 5600 [details] [review]
fix the signature for main()
Comment 2 Carl Worth 2006-05-11 13:57:15 UTC
Thanks for the report and the fix. This fix has now been pushed out to the
latest 1.1.7 as available in git.

-Carl

commit b7e9506707878367493a8a45c74bb6eb048b7e88
Author: Tim Mooney <enchanter@users.sourceforge.net>
Date:   Wed May 10 20:51:53 2006 -0700

    bug #6890: fix the signature for main() in pthread-show-text

diff --git a/test/pthread-show-text.c b/test/pthread-show-text.c
index 71a8675..d04de8b 100644
--- a/test/pthread-show-text.c
+++ b/test/pthread-show-text.c
@@ -70,7 +70,7 @@ start (void *closure)
 }

 int
-main (int argc, char *argv[0])
+main (int argc, char *argv[])
 {
     int err;
     int i, num_threads;

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.