Questions tagged [suppress-warnings]

Compilers and interpreters commonly warn about miscellaneous conditions. Suppressing some or all of those warnings may help to reduce the 'noise' a compiler emits.

Compilers and interpreters commonly warn about miscellaneous conditions. Suppressing some or all of those warnings may help to reduce the 'noise' a compiler emits.

Common warnings may be deprecation warnings or the use of an undefined value.

790 questions
25
votes
4 answers

gcc suppress warning "too small to hold all values of"

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…
jsren
  • 325
  • 3
  • 7
24
votes
13 answers

How do I fix Rubygems recent deprecation warning?

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…
Hartator
  • 5,029
  • 4
  • 43
  • 73
23
votes
3 answers

Suppress AndroidManifest.xml minSdkVersion related warning

As recomended here http://developer.android.com/guide/practices/screens_support.html for compatibility reasons my AndroidManifest.xml contains this: This generates warning in…
Dmitry Ryadnenko
  • 22,222
  • 4
  • 42
  • 56
23
votes
6 answers

Exporting data from MySQL docker container

I use the official MySQL docker image, and I am having difficulty exporting data from the instance without errors. I run my export like this: docker run -it --link containername:mysql --rm mysql sh -c 'exec mysqldump …
DMCoding
  • 1,167
  • 2
  • 15
  • 30
23
votes
3 answers

suppress warning for generated c# code

I have turned on "Treat warnings as errors" for my VS project which mean that I get errors for missing documentation (nice reminder for this particular project). However, part of the code is generated by a custom tool which does not insert xml…
soren.enemaerke
  • 4,770
  • 5
  • 53
  • 80
22
votes
3 answers

C# Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first

I know these warnings are probably pointless.. But anyway I could get rid of them? I got 7 of these warnings. Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first This has something to do with the OR…
SSpoke
  • 5,656
  • 10
  • 72
  • 124
22
votes
1 answer

Python Pandas – How to supress PerformanceWarning?

How I can supress a PerformanceWarning in pandas? I've already tried warnings.simplefilter(action='ignore', category=PerformanceWarning), but it gives me a NameError: name 'PerformanceWarning' is not defined
Vaiaro
  • 908
  • 1
  • 9
  • 20
22
votes
5 answers

Is is possible to disable this warning in clang? warning: #pragma once in main file

warning: #pragma once in main file We're running our headers through clang to get a partial AST. Is it possible to disable that warning?
kylawl
  • 310
  • 1
  • 2
  • 9
22
votes
5 answers

suppresing output to console with ruby

I am writing some unit tests like the following: def executing_a_signal a_method(a_signal.new, a_model, a_helper); assert_equal(new_state, a_model.state) end The tests work fine, but the method which runs just before the assertion to execute…
denchr
  • 4,142
  • 13
  • 48
  • 51
21
votes
4 answers

clang-tidy: How to suppress warnings?

I recently started experimenting with the clang-tidy tool of llvm. Now I am trying to suppress false warnings from third party library code. For this I want to use the command line options -header-filter= or -line-filter= but so far…
Knitschi
  • 2,822
  • 3
  • 32
  • 51
21
votes
3 answers

How to avoid deprecation warnings when @SuppressWarnings("deprecation") doesn't work?

We have a Java project. We enable -Xlint (enable warnings) and -Werror (treat warning as error) flags for javac, to make sure our code is warning-free. Recently we decide to deprecate a class. The problem is in some cases…
Reci
  • 4,099
  • 3
  • 37
  • 42
21
votes
7 answers

Function checking if an integer type can fit a value of possibly different (integer) type

Is it possible to create a templated function that checks if a primitive data type can fit a value of potentially different primitive data type? Let's limit the scope to integer types for the moment. More precisely: Is it possible to create a "one…
Antonio
  • 19,451
  • 13
  • 99
  • 197
21
votes
1 answer

Suppress Valgrind warnings from iOS SDK

I followed this approach to run Valgrind on an iOS app. Unfortunately the warnings pertaining to the iOS SDK make it almost impossible to find any warnings related to my app. Is there a list of iOS suppressions for Valgrind so I don't have to…
moinudin
  • 134,091
  • 45
  • 190
  • 216
20
votes
4 answers

Is it alright to suppress/hide PHP notices?

I've suppressed notices for quite some time with no problems whatsoever but I am beginning to wonder if I'm doing the right thing. I can't seem to find any logical reason why I shouldn't just suppress them but some other people seem to think that…
animuson
  • 53,861
  • 28
  • 137
  • 147
20
votes
2 answers

How to get the @SuppressWarnings warning name for an IntelliJ warning?

IntelliJ wrongly tells me that a field initializer is redundant, but it is in fact used by Lombok's @Builder.Default. I would like to suppress this warning using @SuppressWarnings but I don't know what the warning is called (alt-enter also gives me…
user1779715