Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7512181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:47:14+00:00 2026-05-29T23:47:14+00:00

I have the compiler error: libvncserver/main.c:245: error: format not a string literal and no

  • 0

I have the compiler error:

libvncserver/main.c:245: error: format not a string literal and no format arguments

And line 245 is:

fprintf(stderr,buf);

where buf is “char buf[256];”

I don’t see what is wrong with line 245 and how can I fix it?
When I comment out that line, the program compiles.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:47:15+00:00Added an answer on May 29, 2026 at 11:47 pm

    What is wrong is that any printf function expects a const char * while you are providing just a char *. Since the buffer can contain whatever you want the compiler is not sure that it will contain a correct format string. Just do

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

    so that it will be sure that you are not going to pass something strange.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 1 compiler error. It is from this line in my code: cout
I'm getting a compiler error saying that Acme.Business.User is not defined. I have a
I have a basic compiler error I am not able to figure out. Code:
I have the following situation below. This code will throw a compiler error for
Can someone help me sort out this compiler error? I have a class like
i have code, from http://www.koders.com/csharp/fid474AD07673DE318A1237D142E2BEF5E41CAFAA8B.aspx?s=opc#L1 ComApi.CreateInstance(...) and i have compiler error, that namespace 'ComApi'
I have the following code that generates a compiler error: Boolean IConvertible.ToBoolean(IFormatProvider provider) {
Hello I have this code with a compiler error (error is from Microsoft Visual
I am experiencing a strange compiler error with extension methods. I have an assembly
Hey Everyone, How do I fix the Compiler Error upon compiling on return ((string)(this[TargetDir]));

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.