suppress-warnings

Eclipse - @SuppressWarnings(“javadoc”) does not work

半城伤御伤魂 提交于 2019-12-06 03:26:14
问题 I have my Eclipse configured to show warnings on missing javadoc comments and tags for public elements. That comes very usefull for me in order to keep my code well documented. But sometimes I have a class, where I have several constants describing for example states of DFA or something.. theres no need to document theese constant, because they are self-explaining.. So I added annotation @SuppressWarnings("javadoc") to the class and here's my point - Eclipse does not concider the annotation

Suppress FindBugs warnings in Eclipse

我的未来我决定 提交于 2019-12-06 01:23:07
I am using a string as a lock and so want to ensure the object is a new instance. FindBugs complains because it's generally more efficient to define the string directly (with double quotes). My code looks like: /** A lock for the list of inputs. */ @edu.umd.cs.findbugs.annotations.SuppressWarnings("DM_STRING_CTOR") //We want a new String object here as this is a lock. private final Object inputListLock = new String("inputListLock"); Am I doing something wrong here? The Eclipse FindBugs plugin is still reporting this as a problem: Pattern id: DM_STRING_CTOR, type: Dm, category: PERFORMANCE

Disable warnings in Visual Studio 2008

柔情痞子 提交于 2019-12-05 12:36:10
Env: Visual Studio Warning Level is set to 4, Code in the only file in solution: #pragma warning( push ) #pragma warning( disable: 4503 ) #pragma warning( disable: 4702 ) #include <boost/property_tree/ptree.hpp> #pragma warning ( pop ) //mark #include "iostream" int main() { boost::property_tree::ptree pt; for( boost::property_tree::ptree::const_iterator it = pt.begin(); it != pt.end(); ++it ) { std::cout << it->second.data() << '\n'; } return 0; } Problem: Warning 4503 still show up when compiling. Something else I have tried: put the line with '//mark' as last line of the app, no effect. if

Is it possible to disable specific compiler warnings?

做~自己de王妃 提交于 2019-12-05 11:36:52
I am trying to suppress specific compiler warnings, namely System.Data.OracleClient.OracleConnection' is obsolete . I came upon these questions here: How to disable specific warnings for the entire solution? Globally suppress c# compiler warnings ...but they don't seem to apply to VS2013. When I go to my project's properties, I don't see a Build tab. I see a Compile tab, but it doesn't appear to have a place to specify warning messages to suppress. I see a section there called Warning configurations , but I don't see the warning I am looking for. Update: It turns out that I am trying to do

How to disable Linker Warnings from static libraries on xcode?

可紊 提交于 2019-12-05 08:40:32
In my current Swift project, I have a 3rd party static library, added through the Build Phases > "Link Binary With Libraries" section. After updating to xcode 8.3, this library started throwing some linker warnings (e.g.: pointer not aligned at address 0x00000 from libraryFile.a) As pointed out by other answers ( https://stackoverflow.com/a/8580123/2754958 and https://stackoverflow.com/a/6921972/2754958 ), the compiler warnings could be ignored by adding a flag to the library code. However, in my case, the libraries are static, and the warning are from the linker. Is there a way to disable

Suppress particular warning in Ruby

ぐ巨炮叔叔 提交于 2019-12-05 05:54:26
I've seen plenty of posts providing the -W0 flag as an answer to this issue, but I don't want to suppress all warnings, just warnings of a particular value. I'm running a non-rails app (which uses ActiveRecord, notwithstanding) on Ruby 1.8.7. I want to keep all warnings except for the following DEPRECATION WARNING: Object#id will be deprecated; use Object#object_id If that's not possible, I'd like to jettison all deprecation warnings. Java, at least, lets you do this. How about Ruby? Update: I've upvoted both answers but checked the one that later searchers will expect to find here. If there's

Is it possible to disable compiler warning C4503?

◇◆丶佛笑我妖孽 提交于 2019-12-05 03:44:52
The following code does NOT suppress ANY C4503 compiler warnings, but it does suppress C4244 warnings. #pragma warning(push) #pragma warning(disable:4503) #pragma warning(disable:4244) #include <map> #include <string> int main(int argc, char *argv[]) { class Field; typedef std::map<std::string, Field * > Screen; typedef std::map<std::string, Screen> WebApp; typedef std::map<std::string, WebApp> WebAppTest; typedef std::map<std::string, WebAppTest> Hello; Hello MyWAT; // The C4503 error is NOT suppressed int a; a = 5.0f; // The C4244 error is suppressed } #pragma warning(pop) Please

Rspec rails printing lot of warnings

梦想的初衷 提交于 2019-12-05 01:55:56
I am testing a rails 4.1.0 application with rspec-rails 3.0.1. rspec command is printing a large number of warnings about the gems I am using in the application. I have included a part of the output below. I want to know whether is it possible to suppress this. /home/indika/Documents/rails/news_app/config/initializers/kramdown.rb:6: warning: method redefined; discarding old convert_img /home/indika/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/kramdown-1.4.0/lib/kramdown/converter/html.rb:259: warning: previous definition of convert_img was here /home/indika/.rbenv/versions/2.1.1/lib/ruby

How can I suppress warnings (codebase-wide) during javadoc compilation?

妖精的绣舞 提交于 2019-12-05 01:11:13
I'm stuck with a legacy Java codebase that has THOUSANDS of warnings when you compile it. I would love to actually fix the source of all these warnings, but unfortunately that's not an option at this time at my company (other things like "making new products that generate revenue" are considered higher priority by the people in charge; fancy that). Now, I could just live with all of these warnings, if it wasn't for the fact that they make it difficult to find actual errors in the output from our continuous build server. The build server just uses an ant call, nothing fancy, but so far I haven

How to specifically suppress “Comparing identical expressions” in Eclipse-Helios JDT

只谈情不闲聊 提交于 2019-12-05 00:51:38
I tried annotating the enclosing method with @SuppressWarnings("compareIdentical") but this does not work (worse yet, the annotation results in its own Unsupported @SuppressWarnings("compareIdentical") warning!) I know that I can always use @SuppressWarnings("all") but that'd be more warning-suppression than I want. FWIW, I got the "compareIdentical" string from the "Warning Options" table in http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm (a hail-mary pass, to be sure). Thanks! The list of tokens that can be used inside an SuppressWarning