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.
750
questions
0
votes
0
answers
20
views
Android Studio complains about unused code in library project
I have a Android gradle library project of type "com.android.library".
Of course there are many methods/classes/... which aren't used because they aren't called from within the library ...
1
vote
0
answers
19
views
Visual Code Studio with C/C++ extension: How to disable warnings
I'm working with Zephyr OS in the Visual Code Studio IDE.
Zephyr uses a lot of Macros but the C/C++ extension does not like that and throws Warnings.
One example of a warning you can see here on the ...
0
votes
0
answers
27
views
Blocking a specific warning
I am continuously getting the following warning message on my work laptop, an issue similar to this one:
Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="//...
0
votes
1
answer
49
views
Can I suppress all warnings when including a specific file?
I'm working with a recent version of gcc, writing C++ code (but I would like an answer which would work for C as well). I have various extra warning flags enabled.
In my code, I am including a header ...
4
votes
1
answer
44
views
How to vectorize a function that reduces an array to a scalar—or shut off the warning message?
I'm making a surface plot of the LogSumExp function. This function is similar to max, in that it takes a set of numbers and returns (approximately) the maximum of those numbers; unlike max, the ...
1
vote
1
answer
44
views
How can I suppress (particular) warnings for a particular class (and its subclasses)?
The story: I've learned that it's recommended to define all instance attributes in the __init__() function of a class for better clarity. And I've been following this best practice for a long time ...
0
votes
2
answers
36
views
How to suppress warnings globally in a R package function
This is an update to an old question, How to suppress warnings globally in an R Script
where the solution was like using
warn <- options(warn=-1)
on.exit(options(warn))
But now CRAN says ...
0
votes
0
answers
25
views
How to suppress warnings in import statement
We got the following warning when compile the code.
warning: [deprecation] PhoneStateListener in android.telephony has been deprecated
on
import android.telephony.PhoneStateListener;
We have been ...
1
vote
0
answers
70
views
How to disable a warning in code generated by a maven plugin?
I am generating sources as part of a Java 17 maven build using version 5.4.0 (latest release as of 2022-04-05) of openapi-generator-maven-plugin. Works fine.
Unfortunately the generated source uses a ...
0
votes
0
answers
29
views
Duplicate reference warning jupyter-book
I am getting duplicate reference definition warning while building jupyter-book, also I could not find which reference definition is duplicated. How can I avoid from this warning or how can I suppress ...
0
votes
1
answer
173
views
Suppress c# warnings for all projects on user level
Is there any possibility to switch warnigs off on an individual, site-specific (not project-related) level?
Background: most warnings are null reference warnings on code that is already tested. In the ...
0
votes
0
answers
108
views
How to disable implicit conversion changes signedness warning in CMAKE
Does anybody know if there is a way to disable this kind of warning given by clang in CMAKE please ?
std::vector<float> v{1.f, 2.f, 1.f};
int i = 1;
float foo = v[i]; // Here we get the warning, ...
0
votes
1
answer
187
views
gcc c++ how to disable the `-Wno-error=permissive` error when `-fpermissive` and `-Werror` are both on?
For this struct and function:
typedef struct data_s
{
int i1;
int i2;
} data_t;
void print_data_passed_by_ptr(const data_t *data)
{
printf(" i1 = %i\n"
" i2 = %...
0
votes
1
answer
104
views
Python suppress warnings messages in console logs
I have a python program that when I run works as expected but there is this annoying statement that spams my console logs.
W0131 18:09:51.881016 2064 default_variables.cpp:91] Fail to fscanf: Success ...
0
votes
0
answers
101
views
Cppcheck incorrect uninitialized member variable warning
I am running cppcheck on a project, and when I do, I have been getting a warning stating there is an "uninitialized member variable" (with error code [uninitMemberVar]). If I go and check ...
3
votes
2
answers
95
views
Julia Differential Equations suppress warning of detected instabilities
I have a program that simulates the paths of particles using the Differential Equations package of Julia. The simulation allows for particles to hit devices - to prevent the continued simulation of ...
2
votes
2
answers
112
views
How to fix a Deprecation Warning, Firefox ProfilesIni has been deprecated in java
I want to use my custom Firefox profile and I'm getting a Deprecation Warning on
ProfilesIni myProfile = new ProfilesIni();
@SuppressWarnings. How do I fix this issue.
import org.openqa.selenium....
1
vote
1
answer
158
views
Firefox: how to disable Firefox developer warnings in console?
While developing websites, Firefox insist on spamming the developer console over and over with increasingly inane warning, like this one:
This is a perfect example of warning that cannot be fixed, as ...
0
votes
0
answers
15
views
Is it possible to filter Xst warning with VHDL comment?
With Verilator we can disconnect lint warning locally with comment like it :
/* verilator lint_off UNUSED */
wire [(`H_REG_SIZE - 1):0] hcount;
wire [(`V_REG_SIZE - 1):0] vcount;
/* verilator lint_on ...
1
vote
0
answers
308
views
Flutter linter rules and structure in analysis_options.yaml file
I have been looking off and on for a few days now and I'm trying to customize the rules for linting my flutter project. I'd like to turn off the obvious warnings like unused local variables. Yet when ...
5
votes
2
answers
254
views
How to ignore compiler warnings for macros defined in third-party headers?
Currently it's possible to tell the compiler to ignore warnings from a given header by considering it a "system header", including the header via -isystem /path/to/dir.
However, this still ...
0
votes
1
answer
78
views
Address Sanitizer - suppress for gtest
Is possible to suppress unit test functions? I have address sanitizer in my project and I am getting reports with info about stack-buffer-overflow, which I want to supress.
It's already one ...
0
votes
0
answers
40
views
Access Run Time, Trusted Locations not working
I'm having problems getting trusted locations working on a pc running Access Runtime. Despite having the necessary key entries in the registry the warning still displays each time i load the database.....
0
votes
0
answers
62
views
How to suppress warnings when NA's are introduced by coercion?
The below Shiny code has 2 linked matrices; the first is rendered in the sidebar panel as "Scenario 1" and the second is rendered in modal dialog upon clicking the single action button. The ...
3
votes
1
answer
131
views
Automatically know if a GCC/Clang warning comes from Wall or Wextra?
I wonder if there's some clever, automatic way of knowing if a particular compiler warning (e.g. -Wunused-parameter) comes from the group -Wall, -Wextra, or another group, for both GCC and Clang.
Use ...
0
votes
1
answer
68
views
Silencing numba warning
I have a numba decorated function which is called by another class method. It keeps giving me deprecation warnings. To silence it I've so far tried:
(1) adding @jit(warn=False), but throws an error ...
1
vote
1
answer
57
views
How do I suppress/turn off a particular warning in MS Word using Macros?
I am making a brochure for my event in MS Word, and I keep getting this error (when I try to print it) which is really annoying me -
I found out that one can turn off/suppress warnings using Macros ...
1
vote
0
answers
209
views
How to find obsolete @SuppressWarnings for Sonar Rules?
I'm using
SonarQube Community Edition Version 8.4.2 (build 36762), and
SonarLint for Eclipse 5.5.2.24675
I suppress certain false positives by using e.g.
@SuppressWarnings("java:S1192") // ...
1
vote
2
answers
1k
views
How to supress Connext warning in ROS2
Is there a way to suppress this annoying warning that appears each time I run the bash after sourcing ros2 in ~/.bashrc without using Connext?
[connext_cmake_module] Warning:
The location at which ...
0
votes
1
answer
98
views
Clang issues -Wunused-value depending on whether the code is called from a macro
I use a special assertion macros called CHECK. It is implemented like this:
#define CHECK(condition) check(condition).ok ? std::cerr : std::cerr
The user can choose to provide additional information ...
0
votes
0
answers
41
views
How do I ignore unused warnings in quasiquotes?
I have a macro that is using quasiquotes like:
accessor.tree match {
// FIXME: Get rid of the unused warning here.
case q"($source) => $rhs" => validate(rhs, hasSelect =...
1
vote
2
answers
881
views
setting `PYTHONWARNINGS` to disable python warnings seems to do nothing
I'm currently running the openstack executable and it generates python deprecation warnings.
After some searching I did find this howto.
The relevant part is here:
Use the PYTHONWARNINGS Environment ...
1
vote
2
answers
990
views
How to suppress gradle warning about Deprecated Gradle features?
I am using the latest Gradle v7.2
When I compile it gave me warning
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to ...
1
vote
1
answer
1k
views
How to SupressWarnings for Sonar Security Hotspots?
I'm getting a Sonar CSRF Security Hotspot complaint on a Spring Boot code with Spring Security enabled that needs to be reviewed every then and now, and I would like to suppress the hotspot from the ...
2
votes
1
answer
707
views
Webpack: Suppressing warnings from a specific file
I'm trying to suppress some FontAwesome Sass compilation warnings that obviously cannot be fixed from my end like so:
config.ignoreWarnings = [
{
file: /_bootstrap\.scss$/i
}
]
But the ...
0
votes
0
answers
277
views
Why clang tidy doesn't like assert in constexpr function?
I have a simple function,
int f(int x){
assert( x > 0 );
... do something ...
}
The compiler and clang-tidy are happy with it.
Then I make the function constexpr,
constexpr int f(int x){
...
1
vote
0
answers
303
views
How to suppress warnings from a go module?
I'm using gosseract, a Go OCR package that uses Tesseract for reading characters from images. I am using the demo's code right now like so:
client := gosseract.NewClient()
defer client.Close()
client....
0
votes
0
answers
134
views
How to quell this C6386: Buffer overrun while writing ... warning? // am 99% certain it is bogus
I am getting the following warning message in Visual Studio C++:
C6386: Buffer overrun while writing to 'g_bufferInfos': the writable
size is 'n*24' bytes, but '48' bytes might be written.
From the ...
1
vote
1
answer
86
views
How to suppress ResourceWarning()s in doctest running under unittest
My Python doctests open some files that it never closes. This causes no problems; they're automatically closed when the object is destroyed and adding logic to ensure they're expicitly closed would ...
4
votes
2
answers
849
views
EditorConfig: Allow or Enforce Private Fields to Begin with An Underscore
EDIT: I'm using VS Code.
I'm getting the following warning for my code that prefixes private fields with an underscore:
Naming rule violation: Prefix '_' is not expected [MyProject]csharp(IDE1006)
...
2
votes
1
answer
95
views
How to suppers "ignored promise" warnings in intellij but only for a specific function?
I have a function (foo) in my project which returns a promise but often it is not needed to wait for the promise to resolve so there is never a .then() handler attached. Intellij IDEA being helpful as ...
1
vote
1
answer
127
views
Cannot suppress warnings that are executed during an import call
I'm unable to filter warnings in Python when they're emitted as part of an import. I've tested the following with Python3.8.
This works:
File A:
import warnings
def old_func():
warnings.warn(&...
1
vote
0
answers
131
views
How can I change the Microsoft Dynamic 365 X++ class template in Visual Studio 2017?
I've currently set up a environment for learning Microsoft Dynamics 365.
While I am playing around with code, I am getting a million warnings about missing documentation.
As:
I am a strong believer ...
7
votes
1
answer
111
views
Understanding pragmas
I have a few related questions about pragmas. What got me started on this line of questions was trying to determine whether it's possible to disable some warnings without going all the way to no ...
0
votes
1
answer
115
views
Set default value or ignore Append Query Field that does not exist in MS-Access
I have a series of Excel Tools that work with an Access database (which is really the front end to a series of SharePoint lists). Each Excel Tool has an export function that creates a separate file (...
0
votes
1
answer
692
views
In VSCode, prevent PyLance warning: Invalid character in identifier
After an update to VSCode's Python plugin, PyLance is causing trouble.
def 𒀖(f, *args):
if f:
f(*args)
... causes "Invalid character in identifier"
How ...
0
votes
1
answer
149
views
Suppress warnings with loading tiff images in tensorflow doesn't seem to work?
I keep getting the following warning when using tfio.experimental.image.decode_tiff. I find that it works fine but keeps giving these warnings, which I want to suppress.
TIFFFetchNormalTag: Warning, ...
0
votes
1
answer
137
views
Disable all warnings from a specific module
I would like to disable all warnings coming from a specific module, such that
import foo
import bar
foo.warning_method() # should not warn
bar.warning_method() # should warn
Is there a way to ...
2
votes
1
answer
87
views
Is there a way to get a report of suppressed lint messages?
I am using PC-Lint Plus and suppressing few lint warnings throughout the source code. Is there a way in PC-Lint Plus to get a report of line numbers (or file names) where someone has suppressed ...
-1
votes
1
answer
307
views
Suppress UndefinedBehaviorSanitizer warnings from external libraries
I have an UndefinedBehaviorSanitizer build (-fsanitize=undefined), and I am trying to suppress a warning for UB in an external library that is out of my control. The clang/gcc docs mention ...