suppress-warnings

How can I temporarily disable the “return value might be undefined” warning?

扶醉桌前 提交于 2019-12-13 11:55:40
问题 I want to disable a specific warning (W1035) in my code, since I think that the compiler is wrong about this warning: function TfrmNagScreen.Run: TOption; begin if ShowModal = mrOk then Result := TOption(rdgAction.EditValue) else Abort end; There is no way the result could be undefined, since Abort throws EAbort . I tried: {$WARN 1035 Off} : Apparently this only works for some specific errors (see Documentation) {$W-1035} : Does nothing at all I know I can switch off the warning globally in

How do you suppress GCC linker warnings?

天涯浪子 提交于 2019-12-12 10:39:31
问题 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 is of the following form: ld: warning: <some symbol> has different visibility (default) in <path/to/library.a> and (hidden) in <path/to/my/class.o> The

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

与世无争的帅哥 提交于 2019-12-12 08:53:51
问题 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 value of the iteration variable." I know it's not a good practice to use the iteration variable in the lambda expression, because lambda expressions are evaluated

Don't print the kafka-console-consumer warnings

ⅰ亾dé卋堺 提交于 2019-12-12 08:15:00
问题 I am trying to debug encrypted messages onto a Kafka cluster. Obviously these messages are full of non printable characters and are not usable on a console, so I wanted to save the output in a file like this: kafka-console-consumer \ --zookeeper 0.zookeeper.local,1.zookeeper.local \ --max-messages 1 \ --topic MYTOPIC > /tmp/message I am unable to decrypt the resulting message, because the output contains, along with the ciphertext, warning messages such as: [2016-02-24 11:52:47,488] WARN

How to suppress warnings for 'void*' to 'foo*' conversions (reduced from errors by -fpermissive)

流过昼夜 提交于 2019-12-12 07:49:05
问题 I'm trying to compile some c code with g++ (yes, on purpose). I'm getting errors like (for example): error: invalid conversion from 'void*' to 'unsigned char*' [-fpermissive] adding -fpermissive to the compilation options gets me: error: invalid conversion from 'void*' to 'unsigned char*' [-Werror=permissive] which seems to be a error because of -Werror , however adding -Wno-error=permissive -Wno-permissive results in: error: -Werror=permissive: no option -Wpermissive error: unrecognized

How to suppress “Availability does not match previous declaration” warning

断了今生、忘了曾经 提交于 2019-12-12 03:00:10
问题 I have to use some private functions, like: SCDynamicStoreRef SCDynamicStoreCreate ( CFAllocatorRef allocator, CFStringRef name, SCDynamicStoreCallBack callout, SCDynamicStoreContext *context ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA); By default they are not allowed for iphone, so I've changed declaration of them in my .m file. But now it shows "Availability does not match previous declaration" warning. How to suppress this warning? 回答1: With the usual disclaimer that using private

Valgrind suppression with using frame-level wildcard (ellipses)

…衆ロ難τιáo~ 提交于 2019-12-12 02:26:15
问题 I'm catching quite a few uninitialized value(s) under Valgrind. The finding is expected because its related to to OpenSSL's PRNG: ==5787== Use of uninitialised value of size 8 ==5787== at 0x533B449: _x86_64_AES_encrypt_compact (in /usr/local/ssl/lib/libcrypto.so.1.0.0) ==5787== by 0x533B6DA: fips_aes_encrypt (in /usr/local/ssl/lib/libcrypto.so.1.0.0) ==5787== by 0x56FBC47: ??? (in /usr/local/ssl/lib/libcrypto.so.1.0.0) ==5787== by 0x56FBD27: ??? (in /usr/local/ssl/lib/libcrypto.so.1.0.0) =

How to tell if an error was suppressed by the @ error control operator?

主宰稳场 提交于 2019-12-11 23:56:29
问题 A 3rd party library I'm using uses the @ error suppression operator in its codes which causes suppressed errors via @ still cause an error output because I am using a custom error handler (set_error_handler()) . In this page it says If you have set a custom error handler function with set_error_handler() then it will still get called, but this custom error handler can (and should) call error_reporting() which will return 0 when the call that triggered the error was preceded by an @. However

How to suppress warnings about lack of cert verification in a requests HTTPS call?

匆匆过客 提交于 2019-12-11 09:27:36
问题 I would like to disable the warning about a lack of certificate verification in a HTTPS call using requests . The question has been asked in the past, leading to answers about disabling a relevant request logging or the urllib3 SSL warning. This used to work in the past (I remember successfully silencing the warnings) but seems not to work anymore? I put together the two solutions which worked so far: Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170124] on linux >>> import

Get rid of “type qualifier” warnings on functions using the restrict keyword

六眼飞鱼酱① 提交于 2019-12-11 08:19:37
问题 I'm trying to clean up warnings that I'm getting when compiling Blitz++ of the form: /opt/local/include/blitz/tinyvec2.h:261:35: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] /opt/local/include/blitz/tinyvec2.h:264:43: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] /opt/local/include/blitz/tinyvec2.h:267:40: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] <<etc.>> From these kinds of member