This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Pthread error?
On 07/29/2011 10:59 AM, Jan Chludzinski wrote:
The code below appears to have incorrect behavior. The output is:
Compile with -Wall.
Thread 00a104f8 0000002a: The resource is 0
printf("Thread %.8x %.8x: resource is>>> %d\n",
pthread_self(), resource);
Three uses of %, but only two arguments. You're reading random stuff
off the stack because you used printf incorrectly.
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple