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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:32:52+00:00 2026-05-27T01:32:52+00:00

I am testing a solution I tried in a previous question: Use typedef within

  • 0

I am testing a solution I tried in a previous question: Use typedef within struct for naming and indexing text commands

However, I would like to keep my compiler warnings to none. I use static code analysis tools for this purpose, and in the case of certain tools (ie: LINT) I can manually exclude certain rules and warnings on a per-line basis using markup within my comments.

In the case of the first/top answer, I tried that solution, but modified the final structure to look like so:

struct command commands[] =
{
#include "commands.inc",
{NULL, NULL}
};

This is so I can know if, during a search, that I’ve reach the largest addressable member of this array-of-struct and not get an out-of-bounds condition. The problem is that I know have a compiler warning, “Warning: extra tokens at end of #include directive”. Is there any way to disable this warning? I like this solution, and it suits my needs very well.



In the end, I updated my .inc file to be like so:

CMD(list),
CMD(quit),
CMD(start),

instead of

CMD(list),
CMD(quit),
CMD(start)

I then was able to remove the trailing commas from both my macro definitions and from my static initialization code.

  • 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-27T01:32:52+00:00Added an answer on May 27, 2026 at 1:32 am

    You should remove the comma at the end of your #include directive. It should not be there.

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

Sidebar

Related Questions

I need a database for testing a data masking solution. Any database would do
I'm currently in the process of testing our solution that has the whole gamut
I've been struggling coming up with a good solution to separate my testing data
I converted a VS2008 solution that contains some unit testing projects to VS2010. After
I have 2 ASP.Net applications in a solution. One is pretty much a testing
I programmed a GUI application who use the Unit testing framework . The application
I've been searching and testing for a solution the last 3 hours now. I
I've searched a bit for this and tried to implement a self-made solution but
Testing: return request.getCookies() == null; is not an appropriate way test. Is there another
Testing out someone elses code, I noticed a few JSP pages printing funky non-ASCII

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.