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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:36:01+00:00 2026-06-17T16:36:01+00:00

Code that was built using VS 2003 for generating 32 bit binary was built

  • 0

Code that was built using VS 2003 for generating 32 bit binary was built without a single warning.

Same code , without a single code change, Compile and Link is successful using Visual studio 2010 compiler for generating 64 bit binary BUT with below list of warnings.

So, My question is,
Is any warning in the below list a concern at runtime ?

pcd.c(248) : warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

pcd.c(377) : warning C4244: '=' : conversion from 'uintptr_t' to 'ULONG', possible loss of data

pcd.c(236) : warning C4100: 'argv' : unreferenced formal parameter


i.c(183) : warning C4100: 'lpReserved' : unreferenced formal parameter

api.c(506) : warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _stricmp. See online help for details.

api.c(554) : warning C4310: cast truncates constant value

api.c(719) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

api.c(2217) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

api.c(2892) : warning C4312: 'type cast' : conversion from 'ULONG_T' to 'HANDLE_T' of greater size

api.c(559) : warning C4702: unreachable code


stdio.h(234) : see declaration of 'fopen'


api.c(2217) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

prm.c(681) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(234) : see declaration of 'fopen'


host.c(410) : warning C4311: 'type cast' : pointer truncation from 'PVOID_T' to 'unsigned long'


stub.c(138) : warning C4295: 'eye' : array is too small to include a terminating null character


isv.c(372) : warning C4310: cast truncates constant value


chp.c(250) : warning C4244: '=' : conversion from 'SOCKET' to 'ULONG_T', possible loss of data

api.c(665) : warning C4311: 'type cast' : pointer truncation from 'HANDLE_T' to 'LONG'

api.c(1216) : warning C4057: 'function' : 'LPDWORD' differs in indirection to slightly different base types from 'LONG_T *'

hlp.c(1171) : warning C4057: 'function' : 'LPDWORD' differs in indirection to slightly different base types from 'LONG_T *'


neto.c(435) : warning C4057: 'function' : 'PLONG_T' differs in indirection to slightly different base types from 'ULONG_T *'


neto.c(595) : warning C4152: nonstandard extension, function/data pointer conversion in expression

neto.c(2115) : warning C4213: nonstandard extension used : cast on l-value

neto.c(2209) : warning C4057: 'function' : 'int *' differs in indirection to slightly different base types from 'LONG *'

td.c(760) : warning C4244: '=' : conversion from 'uintptr_t' to 'int', possible loss of data

td.c(2104) : warning C4054: 'type cast' : from function pointer 'FARPROC' to data pointer 'PVOID'

msc.c(287) : warning C4133: 'function' : incompatible types - from 'long *' to 'time_t *'


msc.c(1009) : warning C4702: unreachable code


inf.c(400) : warning C4057: 'function' : 'PLONG_T' differs in indirection to slightly different base types from 'ULONG *'

arb.c(166) : warning C4267: '=' : conversion from 'size_t' to 'LONG_T', possible loss of data

arb.c(226) : warning C4244: '=' : conversion from 'int' to 'CHAR_T', possible loss of data

sl.c(441) : warning C4054: 'type cast' : from function pointer 'int (__cdecl *)(unsigned char *,int,int,void *)' to data pointer 'void *'


pco.c(369) : warning C4057: 'function' : 'PLONG_T' differs in indirection to slightly different base types from 'ULONG_T *'

exit1.c(157) : warning C4295: 'publickey' : array is too small to include a terminating null 


env.c(341) : warning C4267: 'function' : conversion from 'size_t' to 'DWORD', possible loss of data

hook.c(221) : warning C4245: 'return' : conversion from 'int' to 'SOCKET', signed/unsigned mismatch

hook.c(817) : warning C4311: 'type cast' : pointer truncation from 'unsigned char *' to 'int'

tor.c(128) : warning C4244: 'function' : conversion from 'time_t' to 'unsigned int', possible loss of data


cth.c(1012) : warning C4244: '=' : conversion from '__int64' to 'int', possible loss of data


cntrl.c(427) : warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.


api.c(263) : warning C4057: 'function' : 'int *' differs in indirection to slightly different base types from 'LONG_T *'

api.c(706) : warning C4057: 'function' : 'int *' differs in indirection to slightly different base types from 'DWORD *'

ii.c(252) : warning C4244: '=' : conversion from 'time_t' to 'long', possible loss of data

Thx

  • 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-17T16:36:02+00:00Added an answer on June 17, 2026 at 4:36 pm

    There are three kinds of warnings:

    1. Warnings about unsafe/deprecated functions. Some of these warnings you might have gotten before, since those functions were unsafe/nonstandard and maybe deprecated before. However, if you have a look at them and ensure to use them correctly (having in mind that the size of some types changes in 64bit), you can continue to use them. However, I’d try to use standard functions where possible. At the very least you should turn off the warnings individually if you are sure to use the functions correctly.

    2. Warnings that should’ve been there before too, such as “unreferenced parameters”, signed/unsigned mismatches, unreachable code and some nasty things like warnings C4295, C4054, C4133. You should fix those, all of them. Some are not very grave (e.g. signed/unsigned mismatch), but also very easy to fix, so fix them just to silence the compiler.

    3. Warnings resulting from different sizes in 64bit on Windows with MSVC. In 32 bit, int, long, long long, pointers, size_t etc. have 32 bit size. You could convert them seamlessly, without data losses. However, in 64 bit, long long, size_t and pointers have 64 bit size, while long and int remain 32 bit. Converting them might lose information, especially if pointers are involved. Try to use the correct types, don’t use narrowing conversions. That also applies for various typedefs to those types, e.g. PVOID, DWORD and all those typedefs WinAPI uses just to have other names for the same things.

    In general: Warnings are there for a reason. Try to silence your compiler as much as possible, by attending each single warning and apply appropiate changes to the code. If you absolutely must do conversions and are sure they won’t affect the validity of your program, use explicit casts (i.e. static_cast in most cases). By doing so you can be sure you don’t miss the single warning that hints at the really stupid mistake you will do one day that completely breaks the whole program and that won’t be found until after long days of debugging. I know it’s tedious, especially on 32/64 bit dual platform compilation, but its worth the effort in the long term.

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

Sidebar

Related Questions

I have a Full and Lite applications that were built from the same code.
Situation: Our company creates software releases that are built using Hudson from code in
I have an existing C++ source code that is built using autotools and i
I'm using Grails 1.3.7. I have some code that uses the built-in base64Encode function
We have an underlying .h file in our platform code that needs built differently
Is there a built in Java code that will parse a given folder and
The debug build of some code utilizing SFHFKeychainUtils that is working without complaint on
I have the following code that was written without Tests but is actually quite
I know I can’t compile my C# code using the default Platform Target :
I am using g++ 4.1.2 and gdb 7.2 I am debugging code that uses

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.