Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc compiler warning: format not a string literal and no format arguments #19

Open
GoogleCodeExporter opened this issue Dec 8, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Compile cmockery using gcc version 4.2.1.
2. Observe warning messages.

What is the expected output? 

No warnings

What do you see instead?

/Users/smb/src/cmockery-staging/osx/../src/cmockery.c: In function 
'vprint_message':
/Users/smb/src/cmockery-staging/osx/../src/cmockery.c:1550: warning: format not 
a string 
literal and no format arguments
/Users/smb/src/cmockery-staging/osx/../src/cmockery.c: In function 
'vprint_error':
/Users/smb/src/cmockery-staging/osx/../src/cmockery.c:1561: warning: format not 
a string 
literal and no format arguments


What version of the product are you using? On what operating system?

cmockery tip on Mac OS 10.6.2 using Xcode 3.2.1, also on CentOS 5.4 wtih gcc 
(GCC) 4.1.2 
20080704 (Red Hat 4.1.2-46)

Please provide any additional information below.

Trivially fixed by adding printf format string to the two printf and fprintf 
calls:

    printf("%s", buffer);

    fprintf(stderr, "%s", buffer);


Original issue reported on code.google.com by Stephen....@gmail.com on 1 Mar 2010 at 7:03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant