Objective-C implicit conversion loses integer precision ‘NSUInteger’ (aka ‘unsigned long’) to ‘int’ warning

The count method of NSArray returns an NSUInteger, and on the 64-bit OS X platform NSUInteger is defined as unsigned long, and unsigned long is a 64-bit unsigned integer. int is a 32-bit integer. So int is a “smaller” datatype than NSUInteger, therefore the compiler warning. See also NSUInteger in the “Foundation Data Types Reference”: … Read more

How to disable unused code warnings in Rust?

You can either: Add an allow attribute on a struct, module, function, etc.: #[allow(dead_code)] struct SemanticDirection; Add a crate-level allow attribute; notice the !: #![allow(dead_code)] Pass it to rustc: rustc -A dead_code main.rs Pass it using cargo via the RUSTFLAGS environment variable: RUSTFLAGS=”$RUSTFLAGS -A dead_code” cargo build

Does there exist a static_warning?

Playing off of Michael E’s comment: #if defined(__GNUC__) #define DEPRECATE(foo, msg) foo __attribute__((deprecated(msg))) #elif defined(_MSC_VER) #define DEPRECATE(foo, msg) __declspec(deprecated(msg)) foo #else #error This compiler is not supported #endif #define PP_CAT(x,y) PP_CAT1(x,y) #define PP_CAT1(x,y) x##y namespace detail { struct true_type {}; struct false_type {}; template <int test> struct converter : public true_type {}; template <> struct … Read more

What is the list of valid @SuppressWarnings warning names in Java?

It depends on your IDE or compiler. Here is a list for Eclipse Galileo: all to suppress all warnings boxing to suppress warnings relative to boxing/unboxing operations cast to suppress warnings relative to cast operations dep-ann to suppress warnings relative to deprecated annotation deprecation to suppress warnings relative to deprecation fallthrough to suppress warnings relative … Read more