Disabling a specific warning in a specific line in Xcode

For CLANG, this works: #pragma clang diagnostic push #pragma clang diagnostic ignored “-Wdeprecated-declarations” // Here I like to leave a comment to my future self to explain why I need this deprecated call NSString *myUDID = [[UIDevice currentDevice] uniqueIdentifier]; #pragma clang diagnostic pop You can use it inside a method, which allows you to be … Read more

How to suppress FindBugs warnings for fields or local variables?

@SuppressFBWarnings on a field only suppresses findbugs warnings reported for that field declaration, not every warning associated with that field. For example, this suppresses the “Field only ever set to null” warning: @SuppressFBWarnings(“UWF_NULL_FIELD”) String s = null; I think the best you can do is isolate the code with the warning into the smallest method … Read more

Disabling a specific compiler warning in VS Code

I was able to get this to work. My solution looks something like this: <PropertyGroup> <TargetFramework>netcoreapp2.1</TargetFramework> <RuntimeFrameworkVersion>2.1.1</RuntimeFrameworkVersion> <NoWarn>0169;8019</NoWarn> </PropertyGroup> <NoWarn> is PascalCase rather than camelCase, and the element is nested inside of a <PropertyGroup>.

How do I get warnings.warn to issue a warning and not ignore the line?

From the docs: By default, Python installs several warning filters, which can be overridden by the command-line options passed to -W and calls to filterwarnings(). DeprecationWarning and PendingDeprecationWarning, and ImportWarning are ignored. BytesWarning is ignored unless the -b option is given once or twice; in this case this warning is either printed (-b) or turned … Read more

How do you tell Valgrind to completely suppress a particular .so file?

For most of the suppression types, you omit the wildcard, like so: { name Memcheck:Cond obj:/path/to/lib/lib.so.10.1 } { name Memcheck:Free obj:/path/to/lib/lib.so.10.1 } { name Memcheck:Value8 obj:/path/to/lib/lib.so.10.1 } Note that you must list each type of error separately, you can’t wildcard them. You must also list the entire pathname of the library (as shown by valgrind, … Read more