suppress-warnings

gcc suppress warning “too small to hold all values of”

浪尽此生 提交于 2019-12-08 14:42:06
问题 I need to use scoped enums so that I can pass them as specific types to our serialiser. I have given explicit integer values for the enum members of Enum1 . I have put two scoped enums matching the description above into a bitfield thus enum class Enum1 { value1 = 0x0, value2 = 0x1, value3 = 0x2 }; enum class Enum2 { value1 = 0x0, value2, value3, // ... value14 }; struct Example { Enum1 value1 : 2; Enum2 value2 : 6; } Now wherever I use the Example type, I get the warning "'Example::value1'

Resharper: how to suppress warning “Field xy is never used” in XAML

[亡魂溺海] 提交于 2019-12-08 10:21:22
问题 I want to suppress a warning in my xaml file. I applied the corresponding quick fix option to "Disable once warning by comment". However, the warning is still active. How do I correctly suppress the warning? I would like to keep the name because it tells something about the purpose of the element. (An alternative would be to remove the name and use a comment.) Edit The issue is only valid vor Resharper version Build 8.2.0.2160. After updating to 8.2.3 the suppression works correctly. (And in

Warnings from boost

≡放荡痞女 提交于 2019-12-08 08:03:32
问题 I have lots of warning from boost library headers, is there any way to resolve this problem? libs/boost/include/boost/numeric/ublas/detail/vector_assign.hpp:382:39: warning: typedef ‘reference’ locally defined but not used [-Wunused-local-typedefs] typedef typename V::reference reference; libs/boost/include/boost/numeric/ublas/detail/vector_assign.hpp:516:40: warning: typedef ‘value_type’ locally defined but not used [-Wunused-local-typedefs] typedef typename V::value_type value_type; libs

Resharper: How to hide suppressed warnings in Inspection Results?

谁说我不能喝 提交于 2019-12-08 03:49:33
问题 I suppressed a Resharper warning in a VB.NET class file (*.vb). As expected, the warning is not highlighted at the border of the text editor. If I show all Resharper warnings for my project I would expect that the suppressed warning is neither shown in the Inspection Results view. However, it is shown, see screen shot. How to I hide warnings in the InspectionResults that are suppressed in the code with an annotation? I am using Resharper 8.2.3 (If you have issues with public properties in

How to make Clang to ignore specific warning in specific block?

别等时光非礼了梦想. 提交于 2019-12-07 13:02:30
问题 I am checking numeric value range with type traits, and unsigned types generate warning. Comparison of unsigned expression >= 0 is always true How to disable some warning at specific code range? I used GCC style #pragma with Clang but this doesn't work. Here's my code. template<typename originT, typename destinationT> void assertForNumericRange(const originT value) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" assertWithReason(value >= std::numeric_limits

Disable warnings in Visual Studio 2008

余生长醉 提交于 2019-12-07 09:31:46
问题 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

How to disable Linker Warnings from static libraries on xcode?

半腔热情 提交于 2019-12-07 05:53:42
问题 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

Is it possible to disable specific compiler warnings?

冷暖自知 提交于 2019-12-07 04:08:31
问题 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

Resharper: How to hide suppressed warnings in Inspection Results?

≯℡__Kan透↙ 提交于 2019-12-07 03:38:41
I suppressed a Resharper warning in a VB.NET class file (*.vb). As expected, the warning is not highlighted at the border of the text editor. If I show all Resharper warnings for my project I would expect that the suppressed warning is neither shown in the Inspection Results view. However, it is shown, see screen shot. How to I hide warnings in the InspectionResults that are suppressed in the code with an annotation? I am using Resharper 8.2.3 (If you have issues with public properties in respect to xaml bindings also see this related question: Resharper says OnPropertyChange set member can be

How do I suppress warnings in Eclipse for PHP?

て烟熏妆下的殇ゞ 提交于 2019-12-07 03:27:09
问题 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, but maybe it isn't? 回答1: You may also set this on a per project base. Go to Project -> Properties -> Validation and modify your settings as you like. You can