<p>When compiling my C++ .Net application I get 104 warnings of the type:</p>

<pre><code>Warning C4341 - 'XX': signed value is out of range for enum constant
</code></pre>

<p>Where XX can be</p>

<ul>
<li>WCHAR</li>
<li>LONG</li>
<li>BIT</li>
<li>BINARY</li>
<li>GUID</li>
<li>...</li>
</ul>

<p>I can't seem to remove these warnings whatever I do. When I double click on them it takes me to a part of my code that uses OdbcParameters - any when I try a test project with all the rest of my stuff but no OdbcParameters it doesn't give the warnings.</p>

<p>Any idea how I can get rid of these warnings? They're making real warnings from code I've actually written hard to see - and it just gives me a horrible feeling knowing my app has 104 warnings!</p>

[{'answer_id': 17790, 'author': 'Huppie', 'author_id': 1830, 'author_profile': 'https://Stackoverflow.com/users/1830', 'pm_score': 2, 'selected': False, 'text': '<p>In Visual Studio you can always disable specific warnings by going to:</p>\n\n<blockquote>\n  <p>Project settings -> C/C++ -> Advanced -> Disable Specific warnings: 4341</p>\n</blockquote>\n'}, {'answer_id': 17793, 'author': 'Aidan Ryan', 'author_id': 1042, 'author_profile': 'https://Stackoverflow.com/users/1042', 'pm_score': 3, 'selected': True, 'text': '<p>This is a <a href="http://forums.msdn.microsoft.com/en-US/vclanguage/thread/7bc77d72-c223-4d5e-b9f7-4c639c68b624/" rel="nofollow noreferrer">compiler bug</a>.  Here\'s <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=159519&amp;SiteID=1" rel="nofollow noreferrer">another post</a> confirming it\'s a known issue. I\'ve got the same issue in one of my projects and there\'s no way to prevent it from being triggered unless you have some way of avoiding the use of OdbcParameter. The most conservative way to suppress only the buggy warnings is to use</p>\n\n<pre><code>#pragma warning( push )\n#pragma warning( disable: 4341 )\n\n// code affected by bug\n\n#pragma warning( pop )\n</code></pre>\n'}, {'answer_id': 19081, 'author': 'Mat Noguchi', 'author_id': 1799, 'author_profile': 'https://Stackoverflow.com/users/1799', 'pm_score': 0, 'selected': False, 'text': "<p>Either wait for a compiler fix or dont <code>#include</code> code that triggers it.</p>\n\n<p>[A verbose way of saying you probably can't.]</p>\n"}]
['https://Stackoverflow.com/questions/17786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1912/']