Help reducing warnings in source code
-
Seismo
- Trained

- Posts: 70
- Joined: 06 Feb 2010, 17:32
Re: Help reducing warnings in source code
continued
You do not have the required permissions to view the files attached to this post.
Last edited by Seismo on 21 Feb 2010, 05:18, edited 3 times in total.
-
Seismo
- Trained

- Posts: 70
- Joined: 06 Feb 2010, 17:32
Re: Help reducing warnings in source code
continued
You do not have the required permissions to view the files attached to this post.
-
Seismo
- Trained

- Posts: 70
- Joined: 06 Feb 2010, 17:32
Re: Help reducing warnings in source code
continued
You do not have the required permissions to view the files attached to this post.
-
Seismo
- Trained

- Posts: 70
- Joined: 06 Feb 2010, 17:32
Re: Help reducing warnings in source code
continued
You do not have the required permissions to view the files attached to this post.
-
Seismo
- Trained

- Posts: 70
- Joined: 06 Feb 2010, 17:32
Re: Help reducing warnings in source code
And last but not least
You do not have the required permissions to view the files attached to this post.
Last edited by Seismo on 20 Feb 2010, 03:27, edited 1 time in total.
-
cybersphinx
- Inactive

- Posts: 1695
- Joined: 01 Sep 2006, 19:17
Re: Help reducing warnings in source code
WarningC4005AndC4273.patch: lib/framework/debug.c crtdbg.h needs to be #ifdefed.
WarningC4090.patch: How does making a string untranslatable help fix warnings?
WarningC4098.patch: looks ok, applied.
WarningC4716(_2).patch: We don't usually enclose return arguments in (), and the functions flex creates here return 0, not 1 (not that this is used anywhere...). Committed changed version.
I'll leave the rest to someone else.
Edit: 4701 Potentially uninitialized local variable 'name' used sounds potentially interesting, why do you disable that? And what's 4131 'function' : uses old-style declarator?
WarningC4090.patch: How does making a string untranslatable help fix warnings?
WarningC4098.patch: looks ok, applied.
WarningC4716(_2).patch: We don't usually enclose return arguments in (), and the functions flex creates here return 0, not 1 (not that this is used anywhere...). Committed changed version.
I'll leave the rest to someone else.
Edit: 4701 Potentially uninitialized local variable 'name' used sounds potentially interesting, why do you disable that? And what's 4131 'function' : uses old-style declarator?
-
i-NoD
- Code contributor

- Posts: 318
- Joined: 30 Nov 2008, 00:42
- Location: In the middle of nowhere
Re: Help reducing warnings in source code
We'd better left .vcproj files as they are. Currently they working for both MSVC 2008 and 2005. Or you'll anger some good people
With the exception to _STDLIB_H definition (I didn't tried that way) all other things aren't necessary. Ignoring default lib is just a bad thing as it reminds of the problem: we need to build all the libs with correct run-time library to resolve the issue and it's BIG problem on Windows.
download/file.php?id=5661 is a good one. (heh... already applied)
download/file.php?id=5660 will remove internalization, no?
Will check other later...
With the exception to _STDLIB_H definition (I didn't tried that way) all other things aren't necessary. Ignoring default lib is just a bad thing as it reminds of the problem: we need to build all the libs with correct run-time library to resolve the issue and it's BIG problem on Windows.
download/file.php?id=5661 is a good one. (heh... already applied)
download/file.php?id=5660 will remove internalization, no?
Will check other later...
-
Seismo
- Trained

- Posts: 70
- Joined: 06 Feb 2010, 17:32
Re: Help reducing warnings in source code
Ok. Please have a look to the attached patch.cybersphinx wrote:WarningC4005AndC4273.patch: lib/framework/debug.c crtdbg.h needs to be #ifdefed.
Sorry for the back answer, but is this a rhetorical question?cybersphinx wrote:WarningC4090.patch: How does making a string untranslatable help fix warnings?
Ah, ok, i was assuming that the result should be a boolean true...cybersphinx wrote:WarningC4716(_2).patch: We don't usually enclose return arguments in (), and the functions flex creates here return 0, not 1 (not that this is used anywhere...). Committed changed version.
Its a level 4 warning assuming: You may have used the local variable name without first assigning it a value, which could lead to unpredictable results. BUT if you use it without assigning the compiler will throw an error.cybersphinx wrote:Warning 4701 Potentially uninitialized local variable 'name' used sounds potentially interesting, why do you disable that?
Whatever, patch is here now
Well, after some hours of googeling and reading about flex issues and warnings i decided not to victimize me with this. Flex produces spaghetti code at its best with gotos, unreachable code and even this warning. So its hard to say, but without changing the root cause, that means replacing flex itself, we are not able to fix it.cybersphinx wrote:And what's 4131 'function' : uses old-style declarator?
The only difference (to vs 2005) is the version, which can be corrected very easy. But to declare the _STDLIB_H should be done in future release for suppressing annoying warnings with macro re-defenitions (and what a surprise) come into being by flex results. And please do not forget to set _CRTDBG_MAP_ALLOC also.i-NoD wrote:We'd better left .vcproj files as they are. Currently they working for both MSVC 2008 and 2005
i-NoD wrote:Ignoring default lib is just a bad thing as it reminds of the problem: we need to build all the libs with correct run-time library to resolve the issue and it's BIG problem on Windows.
Well, i might not get this right now, due to the fact that this warning just say what it do. Ignoring a lib, wich is anyhow unused. Its a solution by microsoft btw. to ignore this lib.
You do not have the required permissions to view the files attached to this post.
Last edited by Seismo on 20 Feb 2010, 04:14, edited 1 time in total.
-
cybersphinx
- Inactive

- Posts: 1695
- Joined: 01 Sep 2006, 19:17
Re: Help reducing warnings in source code
Not really, but maybe too opaque. Fixing a warning by making a string untranslatable is no desirable solution.Seismo wrote:Sorry for the back answer, but is this a rhetorical question?cybersphinx wrote:WarningC4090.patch: How does making a string untranslatable help fix warnings?
Seeing that you got the return value warnings from flex as well, you seem to have an old version, which are reportedly quite buggy... But if this is only in flex code, it's uninteresting anyway.Well, after some hours of googeling and reading about flex issues and warnings i decided not to victimize me with this. Flex produces spaghetti code at its best with gotos, unreachable code and even this warning. So its hard to say, but without changing the root cause, that means replacing flex itself, we are not able to fix it.
-
i-NoD
- Code contributor

- Posts: 318
- Joined: 30 Nov 2008, 00:42
- Location: In the middle of nowhere
Re: Help reducing warnings in source code
Which version do you use then? It's a PITA to find a win version which will process current files without errors, buggy or not.cybersphinx wrote:seeing that you got the return value warnings from flex as well, you seem to have an old version, which are reportedly quite buggy... But if this is only in flex code, it's uninteresting anyway.
There is good rule not to touch things you're not understandSeismo wrote:Well, i might not get this right now, due to the fact that this warning just say what it do. Ignoring a lib, wich is anyhow unused. Its a solution by microsoft btw. to ignore this lib.
Try this http://msdn.microsoft.com/en-us/library ... S.80).aspx
Mixing CRTs is a BAD thing, possibly leading to some magic crashes. And you surely can't prevent/fix it with some ignore command.
edit:
Btw, I recall fixing it in latest devpkg, as it doesn't happen for my rel/dbg build. It must be one of you self-build lib...
-
Seismo
- Trained

- Posts: 70
- Joined: 06 Feb 2010, 17:32
Re: Help reducing warnings in source code
Ahh, now i got it, here we arecybersphinx wrote:Not really, but maybe too opaque. Fixing a warning by making a string untranslatable is no desirable solution.
You do not have the required permissions to view the files attached to this post.
-
cybersphinx
- Inactive

- Posts: 1695
- Joined: 01 Sep 2006, 19:17
Re: Help reducing warnings in source code
Whatever is in Debian unstable, 2.5.35 at the moment. I can't really help you for Windows, a simple cross-compile doesn't work...i-NoD wrote:Which version do you use then?
-
Seismo
- Trained

- Posts: 70
- Joined: 06 Feb 2010, 17:32
Re: Help reducing warnings in source code
Well, the current (*coughing*) devpkg from 10/31/2009 do not produce this error, buti-NoD wrote:There is good rule not to touch things you're not understand
Try this http://msdn.microsoft.com/en-us/library ... S.80).aspx
Mixing CRTs is a BAD thing, possibly leading to some magic crashes. And you surely can't prevent/fix it with some ignore command.
edit:
Btw, I recall fixing it in latest devpkg, as it doesn't happen for my rel/dbg build. It must be one of you self-build lib...
Code: Select all
13>libtheora_static.lib(mmxidct.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(x86state.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(dequant.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(mmxfrag.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(mmxstate.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(huffdec.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(fragment.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(bitpack.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(idct1.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(decode1.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(state.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(decinfo.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(quant1.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(apiwrapper.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(decapiwrapper.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(internal.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>libtheora_static.lib(info.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__forceCRTManifestCUR".
13>D:\Programming\Warzone2100\win32\Debug\Warzone2100-Dbg.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
13>Das Buildprotokoll wurde unter "file://d:\Programming\Warzone2100\win32\Debug\BuildLog.htm" gespeichert.
13>Warzone2100 - 18 Fehler, 0 Warnung(en)Whatever, this is a serious issue with my new lib files in devpkg. I will invetigate this. Thank you for your hint.
-
i-NoD
- Code contributor

- Posts: 318
- Joined: 30 Nov 2008, 00:42
- Location: In the middle of nowhere
Re: Help reducing warnings in source code
Are you saying you can't compile project with current devpkg? (and it's only updated to keep up the needed functionality, I don't see any point in chasing any minor release/bugfix of every lib)Seismo wrote:Well, the current (*coughing*) devpkg from 10/31/2009 do not produce this error, but
hmm.. I will double check the devpkg later today...
You need to use /MDd with debug and /MD with release builds of your self-built library. Just check your project file...Seismo wrote:so updating to new libtheora_static.lib leads me to the conflict with the thing i DID not understand (i was only forcing to sqelch warnings that i shortend the investigation of the root cause a bit too much).
Whatever, this is a serious issue with my new lib files in devpkg. I will invetigate this. Thank you for your hint.
edit:
hey, are you using MSVC 2008 without SP1? I recall someone here complaining on the similar error as your stated for devpkg. Try installing SP1, should solve original link errors. I'll make a note about SP1 on compile guide page...
-
Seismo
- Trained

- Posts: 70
- Joined: 06 Feb 2010, 17:32
Re: Help reducing warnings in source code
Yeah baby, you made my dayi-NoD wrote:hey, are you using MSVC 2008 without SP1? I recall someone here complaining on the similar error as your stated for devpkg. Try installing SP1, should solve original link errors. I'll make a note about SP1 on compile guide page...