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 this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I'm trying to build, using msvs 2010 the project found at the following git:
When I try to compile my c++ project using Visual Studio 2010 in either
I've recently begun doing ASP.NET MVC work with others using Visual Studio. While MonoDevelop
Using JDeveloper , I started developing a set of web pages for a project
I am working on a C project in MSVS 2010 (meaning I am using
I'm trying to build Boost 1.49.0 using MSVC2010 and it fails with the following
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
Using a populated Table Type as the source for a TSQL-Merge. I want to
Using SQL Server 2008 R2 we are looking for a way to select the

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.