suppress-warnings

How to suppress Flash migration warnings (1090)

有些话、适合烂在心里 提交于 2019-12-21 09:22:12
问题 In Flash Professional CS4, I get "migration issue" warnings when I use mouse/keyboard input handler names such as onMouseDown, onKeyUp, etc., even though I have added event listeners for them. These names are perfectly legal for functions, but since these were automatically fired in ActionScript 2.0, we are now (albeit sensibly) warned that their use is no longer automatic in AS3. I understand the purpose of the warnings, but they aren't useful for me. I want to suppress these warnings, but

Suppress a warning for all projects in Visual Studio

妖精的绣舞 提交于 2019-12-21 07:08:06
问题 I've seen answers showing how to suppress a warning for a specific line of code or for a specific project. I don't want that. I want to suppress a specific warning for all of my projects. (If it matters, the warning is IDE0044. And I'm using C#.) 回答1: A recent update to Visual Studio 2017 (15.7.1) has an option for this now. Under the Tools->Options menu, select the TextEditor->C#->Code Style->General tab. Under Field preferences , there is a Prefer readonly option. Set that to No . There is

Suppress MySQL warnings?

纵饮孤独 提交于 2019-12-20 03:07:24
问题 Lets say, I have executed a query that triggers some warning messages: eg: DROP TABLE IF EXISTS "abcd"; Is there a way to suppress only warning message that been triggering? I see there is a system variable "max_error_count", changing it to zero may ignore warnings but it would also do all errors/note messages. 回答1: Maybe the sql_notes variable helps you with this problem. Quote from the manpage: The sql_notes system variable controls whether note messages increment warning_count and whether

SunStudio C++ compiler pragma to disable warnings?

半城伤御伤魂 提交于 2019-12-20 02:42:05
问题 The STLport bundled with the SunStudio11 generates alot of warnings. I beleive most compilers have a way to disable warnings from certain source files, like this: Sun C #pragma error_messages off #include <header.h> // ... #pragma error_messages on gcc #pragma warning(push, 0) #include <header.h> // ... #pragma warning(pop) How do you do this in the SunStudio C++ compiler? (btw, the sunstudio C pragmas don't work in sunstudio C++) 回答1: In SunStudio 12, the #pragma error_messages work as

Java: How to @SuppressWarnings unreachable code?

匆匆过客 提交于 2019-12-19 15:26:32
问题 Sometimes when you are debugging, you have unreachable code fragment. Is there anyway to suppress the warning? 回答1: The only way to do this on any compiler is @SuppressWarnings("all") . If you're using Eclipse, try @SuppressWarnings("unused") . 回答2: Java has (primitive) support for debugging like this in that simple if on boolean constants will not generate such warnings (and, indeed when the evaluation is false the compiler will remove the entire conditioned block). So you can do: if(false)

Java: How to @SuppressWarnings unreachable code?

陌路散爱 提交于 2019-12-19 15:26:05
问题 Sometimes when you are debugging, you have unreachable code fragment. Is there anyway to suppress the warning? 回答1: The only way to do this on any compiler is @SuppressWarnings("all") . If you're using Eclipse, try @SuppressWarnings("unused") . 回答2: Java has (primitive) support for debugging like this in that simple if on boolean constants will not generate such warnings (and, indeed when the evaluation is false the compiler will remove the entire conditioned block). So you can do: if(false)

Code Analysis - CA1704: Correct the spelling of 'Ps'

此生再无相见时 提交于 2019-12-18 16:53:47
问题 I am getting the following warning from Code Analysis in VS2010 CA1704 : Microsoft.Naming : Correct the spelling of 'Ps' in member name 'MyClass.PsCalculatedAmount' or remove it entirely if it represents any sort of Hungarian notation. Now in my codebase 'Ps' means 'Per Share' and is used heavily, so I would like to allow it as an acceptable word/acronym. I tried adding it to my CustomDictionary.xml under <Words> <Recognized> <Word>ps</Word> ... <Recognized> <Words> and also tried <Acronyms>

Java Deprecated APIs and SuppressWarnings “deprecation” - practical approach

℡╲_俬逩灬. 提交于 2019-12-18 16:52:21
问题 I have seen many examples of using the Deprecated annotation on APIs in order to mark them as 'need to be replaced soon'. However, in almost all of these cases the code developers not only kept using the deprecated APIs, but also suppressed the deprecation warning. It seems like the best intentions of the API developers end up creating more code which is irrelevant to the implemented business logic - if an API is deprecated but is continually used with the associated warnings being suppressed

Partially disable pedantic warnings in gcc within source

北慕城南 提交于 2019-12-18 14:52:53
问题 I am trying to get gcc to shut up about my usage of binary constants. They make the code more readable, but prevent me from using -pedantic which I comply with otherwise. I would either like to have a switch like -fnobinaryconstwarn or similar (which I don't think exists after perusing the man page for a while) or use a #pragma GCC diagnostic ignored "-pedantic" to selectively disable the pedantic warnings for a short stretch like described here: Selectively disable GCC warnings for only part

gcc warning" 'will be initialized after'

隐身守侯 提交于 2019-12-18 09:56:27
问题 I am getting a lot of these warnings from 3rd party code that I cannot modify. Is there a way to disable this warning or at least disable it for certain areas (like #pragma push/pop in VC++)? Example: list.h:1122: warning: `list<LogOutput*, allocator<LogOutput*> >::node_alloc_' will be initialized after list.h:1117: warning: `allocator<LogOutput*> list<LogOutput*, allocator<LogOutput*> >::alloc_' 回答1: Make sure the members appear in the initializer list in the same order as they appear in the