suppress-warnings

VB.net: Suppress Error Message Problem

I have read the MSDN Page on how to suppress messages. I am unable to supress warnings for VS2008. I have tried the following instructions listed: In the Error List, select the warning or warnings to suppress. Multiple warnings can be selected at the same time. Right-click the warning, point to Suppress Message(s), an...

How can I add a StyleCop rule suppression without StyleCop installed on my machine?

I would like to add a StyleCop SuppressMessageAttribute to some code but I don't want to require StyleCop to be installed. Does my project need to reference the StyleCop binaries and if so, which ones? Also, is the StyleCop SuppressMessageAttribute different to the System.Diagnostics.CodeAnalysis.SuppressMessageAttribute? ...

How do you suppress GCC linker warnings?

I've been on a crusade lately to eliminate warnings from our code and have become more familiar with GCC warning flags (such as -Wall, -Wno-<warning to disable>, -fdiagnostics-show-option, etc.). However I haven't been able to figure out how to disable (or even control) linker warnings. The most common linker warning that I was getting i...

Is there an equivalent to SuppressWarnings in Scala?

I was wondering if scala had an equivalent to java's @SuppressWarnings that can be applied to a function or whatever to ignore any deprecation warnings[1] that function emits? 1: Relevant warning in my case is: method stop in class Thread is deprecated: see corresponding Javadoc for more information. I am aware of the problems with stop...

How to overwrite the `make dist` default target of Qmake?

In a Qt project, I need to provide a custom make dist. So I added the following lines to the *.pro file: QMAKE_EXTRA_TARGETS += dist dist.commands = [...] That works, but shows the following warnings each time I run make: Makefile:209: warning: overriding commands for target `dist' Makefile:188: warning: ignoring old commands for tar...

Java 6: Unsupported @SuppressWarnings("rawtypes") warning

I moved to a new machine which has the latest Sun's Java compiler and noticed some warnings in the existing Java 6 code. The Eclipse IDE, suggested that I annotate the assignment with: @SuppressWarnings("rawtypes") For example: class Foo<T> { ... } ... @SuppressWarnings("rawtypes") Foo foo = new Foo(); When I moved back to the mach...

nosetest deprecation warnings

I am getting deprecation warnings from nosetest for 3rd party modules imported by my code. Does anybody know how to silence these warnings? I know of the following flag which works for arbitrary python runs of the same code: python -W ignore::DeprecationWarning But, calling nosetest does not appear to offer me a similar flag to...

How to suppress boost::thread warnings with gcc ?

Hi, In my project, I recently decided to use boost::thread. My code compiles fine under Linux, but under Windows (either x86 or x64), I get the following warnings with gcc 4.5: In file included from C:\Boost\include\boost-1_44/boost/thread/shared_mutex.hpp:14:0, from C:\Boost\include\boost-1_44/boost/thread/detail/thre...

How do I suppress warnings in Eclipse for PHP?

In Eclipse, I'm getting warnings for not having a start tag (<div>) because the start tag is in another file. How do I suppress this warning to keep it out of my "Problems" window? I know in Java I could do @SuppressWarning, but I don't know how for php. I assume that there is, based on the availability of php type hinting in Eclipse,...

Suppressing "is never used" and "is never assigned to" warnings in C#

I have a HTTPSystemDefinitions.cs file in C# project which basically describes the older windows ISAPI for consumption by managed code. This includes the complete set of Structures relevant to the ISAPI not all or which are consumed by code. On compilation all the field members of these structures are causing a warning like the followi...

How to suppress javascript exception?

In my application i am getting the content of some other domain's page. Along with the content it is running the javascript associated with the particular page. In the javascript code "document.selection.createRange()" is written which is throwing exception at run time in IE (since in IE due to security concern you can't change iframe's ...

How to suppress VB's "Iteration variable shouldn't been used in lambda expression"

I'm working with LINQ in VB.NET and sometimes I get to a query like For i = 0 To 10 Dim num = (From n In numbers Where n Mod i = 0 Select n).First() Next and then it comes the warning "Using the iteration variable in a lambda expression may have unexpected results. Instead, create a local variable within the loop and assign it the...

How to suppress a third-party warning using warnings.filterwarnings

Hi all, I am using Paramiko in my python code (for sftp). Everything works fine except that everytime I import or call a paramiko function. This warning would show up: C:\Python26\lib\site-packages\Crypto\Util\randpool.py:40: RandomPool_Deprecation Warning: This application uses RandomPool, which is BROKEN in older releases. S ee http...

@SuppressWarnings for "extends String"

Hey guys. In a place I have a method with a generic "VT extends String". Obviously this generates a warning: The type parameter VT should not be bounded by the final type String. Final types cannot be further extended. Do you know if there's a way to suppress this warning (Eclipse)? If you're wondering how I got to have this: import jav...

Suppress FindBugs warnings in Eclipse

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 Str...

Suppressing LINQ to SQL DBML warnings

I've generated LINQ to SQL classes from a database not under my control which has a lot of Decimal(38, 5) fields. Apparently the range of the .NET Decimal type is smaller than this, so the LINQ to SQL code generator is throwing a lot of warnings: DBML1008: Mapping between DbType 'Decimal(38,5)' and Type 'System.Decimal' in Column 'St...