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

  • Home
  • SEARCH
  • 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 8749673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:43:59+00:00 2026-06-13T12:43:59+00:00

Getting some compiler/ lint errors for this code. Don’t get what they mean, Does

  • 0

Getting some compiler/ lint errors for this code. Don’t get what they mean,
Does not work

int main(void)
{
    int CountRating();

    return 0;
}

ERRORS:

--- Module:   
    int CountRating();
c(70): warning 937: (Note -- old-style function declaration for function 'CountRating')
.c(70): warning 580: (Warning -- Redeclaration of function 'CountRating(void)' (hiding line 25) causes loss of prototype)
}
C1A5E1_CountRating.c(73): warning 752: (Info -- local declarator 'CountRating()' (line 70) not referenced)

--- Global Wrap-up

(70): warning 714: (Info -- Symbol 'CountRating(void)' (line 70, file c) not referenced)

Works:

int main(void)
{
    CountRating();

    return 0;
}

What do I have to do to make it return an int?

  • 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-06-13T12:43:59+00:00Added an answer on June 13, 2026 at 12:43 pm
    int CountRating();
    

    means you are declaring a function prototype. it can be done within function but should be avoided. (Not a best practice). You are getting warnings because prototype doesn’t match the actual function (int CountRating() vs int CountRating(void).

    CountRating();
    

    means you are calling this function from another method and it is perfectly allowed. hence no warnings.

    if you want to get the returnrd value from function, do it as following:

    int value = CountRating();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some background: I'm getting the dreaded Java compiler level does not match the version
I am getting some errors with my Java Compiler. I am not getting errors
I'm getting some very wierd errors. The compiler seems to want to call the
I'm having some trouble getting this code to compile on Linux but it works
whats wrong with this code and i am getting this error: Compiler Error Message:
I'm getting some nasty segmentation faults through the g++ compiler on the following code.
I've been getting into compiler creation. I've found some terrific beginner stuff and advanced
My document is getting some errors when using the W3C validator because some of
I've been getting some strange errors ( perhaps once per day ) after updating
I have an issue with some compiler warnings I am getting when using T4

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.