suppress-warnings

How to suppress warnings for file included from header

余生颓废 提交于 2019-12-18 06:06:32
问题 I use GCC -Weffc++ option in my Qt project. To suppress warnings from Qt headers i add QMAKE_CXXFLAGS += -isystem $(QTDIR)\include . But this doesn't suppress all warnings, i still get annoying warnings from QUuid class because $(QTDIR)\include\QtCore\quuid.h file includes ..\..\src\corelib\plugin\quuid.h . I tried to add QMAKE_CXXFLAGS += -isystem $(QTDIR)\src and QMAKE_CXXFLAGS += -isystem $(QTDIR)\src\corelib\plugin but it didn't help. Is there a way to fix this? 回答1: You need to suppress

How can I suppress certain CSS errors in Aptana Studio 3?

时间秒杀一切 提交于 2019-12-17 20:43:19
问题 I use Aptana Studio 3 for my web development, and I love it except for a few small gripes. One of these gripes is that Aptana decides to treat some CSS parameters as invalid, marking them with a big red X on that line of code. This is helpful when the error is really an error, but some parameters that are perfectly valid but not a part of the w3 spec (cursor: none, for example) get flagged as invalid. I would just ignore these errors, but as in any other eclipse variant, an error anywhere in

How do I fix Rubygems recent deprecation warning?

狂风中的少年 提交于 2019-12-17 18:28:51
问题 I have recently run updates: gem update --system gem update Now, I come with a lot of deprecation warnings each time I load a gem. For example, rails console : NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01. Gem::Specification#default_executable= called from /Users/user/.rvm/gems/ruby-1.9.2-p180@global/specifications/rake-0.8.7.gemspec:10. NOTE: Gem::Specification#default_executable= is deprecated with no replacement.

Suppress InsecureRequestWarning: Unverified HTTPS request is being made in Python2.6

妖精的绣舞 提交于 2019-12-17 05:17:50
问题 I am writing scripts in Python2.6 with use of pyVmomi and while using one of the connection methods: service_instance = connect.SmartConnect(host=args.ip, user=args.user, pwd=args.password) I get the following warning: /usr/lib/python2.6/site-packages/requests/packages/urllib3/connectionpool.py:734: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html

Suppress InsecureRequestWarning: Unverified HTTPS request is being made in Python2.6

我只是一个虾纸丫 提交于 2019-12-17 05:17:01
问题 I am writing scripts in Python2.6 with use of pyVmomi and while using one of the connection methods: service_instance = connect.SmartConnect(host=args.ip, user=args.user, pwd=args.password) I get the following warning: /usr/lib/python2.6/site-packages/requests/packages/urllib3/connectionpool.py:734: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html

What does casting to `void` really do?

和自甴很熟 提交于 2019-12-17 05:04:59
问题 An often used statement like (void)x; allows to suppress warnings about unused variable x . But if I try compiling the following, I get some results I don't quite understand: int main() { int x; (short)x; (void)x; (int)x; } Compiling this with g++, I get the following warnings: $ g++ test.cpp -Wall -Wextra -o test test.cpp: In function ‘int main()’: test.cpp:4:13: warning: statement has no effect [-Wunused-value] (short)x; ^ test.cpp:6:11: warning: statement has no effect [-Wunused-value]

Suppressing “is never used” and “is never assigned to” warnings in C#

二次信任 提交于 2019-12-17 03:01:00
问题 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 following:- Warning Field 'UnionSquare.ISAPI.HTTP_FILTER_PREPROC_HEADERS.SetHeader' is never assigned to, and will always have its default value null or Warning The

How to suppress GCC warnings from library headers?

妖精的绣舞 提交于 2019-12-17 02:09:26
问题 I have a project that uses log4cxx, boost, etc. libraries whose headers generate lots of (repetitive) warnings. Is there a way to suppress warnings from library includes (i.e. #include <some-header.h>) or includes from certain paths? I'd like to use -Wall and/or -Wextra as usual on project code without relevant info being obscured. I currently use grep on make output but I'd like something better. 回答1: You may try to include library headers using -isystem instead of -I . This will make them

How can I disable/suppress the warning sound played whenever I am building and have warnings?

妖精的绣舞 提交于 2019-12-13 21:19:05
问题 My question today is right to the point. So whenever I build my project or my solution and there is a warning about anything such as a deprecated method, visual studio plays an annoying warning sound and I don't know how to disable the warning sound from being played. I know how to set it so that none of the warnings show up, but the warning sound still plays. Please, if anybody reading my question knows how to disable the warning sound played when visual studio encounters a warning while

How to disable a specific IBM XL C++ compiler warning?

倖福魔咒の 提交于 2019-12-13 17:53:22
问题 Given tmp.cpp: #include <stdio.h> #pragma report(disable, CCN8826) int main(int argc, const char *argv[]) { const char * hi = "hi\n"; printf(hi); return 0; } Despite I use #pragma report that is supposed to suppress the warning, I still get: bash-3.1$ xlC -qformat=all tmp.cpp "tmp.cpp", line 8.12: 1540-2826 (W) The format string is not a string literal and format arguments are not given. How do I get rid of that warning? The error message numbers are here and the #pragma report description is