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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:20:11+00:00 2026-05-24T11:20:11+00:00

I’m using MSVS2010 for a previous project developed in C. I see an issue

  • 0

I’m using MSVS2010 for a previous project developed in C.

I see an issue with Debug vs. release mode. The debug mode gives me my expected result while the release mode gives me wrong result and the results produced by release mode are different in all runs (way different).

Then, I went to the project properties and turned on the Basic Runtime Check (BRC) for the Release mode. If I turn set BRC to “Stack Frames (RTCs)” or RTC1 then the result is the same as Debug mode. If I only use Uninitialized variables (RTCu), the result is wrong.

When I turn on all warnings, there are 3 types of warning in the program:
1. Replace a function X by a function X_s (to disable use _CRT_SECURE_NO_WARNINGS)
2. ‘<’: signed/unsigned mismatch. The reason is I defined

#define NO_OF_INPUTS 20
int j;
j = 0;
while (j<NO_OF_INPUTS) //The warning is for this line
{…}

4 bytes padding added after data member ‘State’. Here is the struct:

typedef struct X
{
    int State;
    double Value;
} XName;

Doing some search on google, I found this:
http://msdn.microsoft.com/en-us/library/8wtf2dfz(v=vs.80).aspx

So I guess the padding stuff may be the thing… Not sure though

Any suggestion to fix the bug? And other warnings if possible…

Best.

  • 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-24T11:20:12+00:00Added an answer on May 24, 2026 at 11:20 am

    It seems hard to give you a good hint because usually such problems occur at some point in code where the programmer makes some assumptions (conscious or not) which are not guaranteed to be fullfilled (like memory initialization etc.) by the standard. Such behaviour can also result from writing/reading to/from memory that is not “yours” (but in Debug mode the memory was initialized or you’re reading/writing some bytes that are not required by the program).

    It’s certainly a good idea to fix warnings as you described them. However, it seems to me like this will not necessarily help. You could try cppcheck to get warnings like uninitialized memory.

    If it is a memory problem, you may not get compiler warnings. In this case Microsofts (free) “Application Verifier” can sometimes help.

    If it doesn’t, you should write unit tests to get closer to the problem. It’s a good idea anyways…

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

Sidebar

Related Questions

Using JDeveloper , I started developing a set of web pages for a project
Using online interfaces to a version control system is a nice way to have
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using C#, I need a class called User that has a username, password, active
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,

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.