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 8354067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:26:37+00:00 2026-06-09T09:26:37+00:00

Lately, I started using lint for static code analysis. One of the warning I

  • 0

Lately, I started using lint for static code analysis.
One of the warning I get sometimes is regarding this issue.
Let’s say for instance that I’ve got the following function:

uint32_t foo( void );

And let’s say that I delibertly ignore the return value of the function.
To make the warning dissapear, one can write

(void) foo();

My question is, what is the “proper” way to write code like this, should I continue as I always did, since the compiler doesn’t complain about it, or should I use the void for clarity, so other code maintainer will know that I delibertly ignored the return value.

When I look at the code like this ( with the void ), it looks pretty strange to me…

  • 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-09T09:26:39+00:00Added an answer on June 9, 2026 at 9:26 am

    The common way is to just call foo(); without casting into (void).

    He who has never ignored printf()‘s return value, cast the first stone.

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

Sidebar

Related Questions

I always thought I understood how this works...but lately I have started really using
I've seen this code lately: static List<Thread> list = new List<Thread>(); static void Main(string[]
I've started using PHP lately... all is good except one thing. I am trying
I started using rails_admin engine lately and can't quite figure out how I can
I have been doing some java development lately and have started using Eclipse. For
This question is motivated by something I've lately started to see a bit too
Just a quick question regarding re-useable code. Ive lately been trying to modularise my
Lately we've started getting issues with outdated countries / regions list being presented to
I've been trying out MVC 4 lately. Started with the developer preview, and now
Lately I've been favoring using named pipes (option --enable-named-pipes) in MySQL running on windows,

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.