This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

I've gotten to the point in my custom Wireshark build for Windows that all that's left now is warnings--but these warnings are being treated as errors. As the vast majority of them are harmless (unused variabled, for example) is there any way to set it so that warnings are not treated as errors?

asked 21 Jan '15, 05:41

mehubb985's gravatar image

mehubb985
118810
accept rate: 0%


For Windows nmake builds, edit the following part of config.nmake as described in the comment:

#Comment out the following if warnings are not to be treated as errors
WARNINGS_ARE_ERRORS=-WX

As Jaap says though, there should be no warnings, all of the core Wireshark code is expected to build without any warnings and your custom code should too.

You might also run the perl check* scripts in tools, as they also pick up errors.

permanent link

answered 21 Jan '15, 06:21

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Have a look at this configure option --enable-warnings-as-errors. Assigning it 'no' should prevent them from happening. But even better, clean up your code to get rid of them, if you can.

permanent link

answered 21 Jan '15, 06:00

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

If a variable is reported as unused, either 1) it's not useful and should be removed or 2) it is useful and there's a typo or some other sort of bug in your code that means it's not being used when it should be.

That's why the Wireshark buildbots turn on warnings-as-errors whenever possible.

(22 Jan '15, 16:05) Guy Harris ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×254
×40
×20
×1

question asked: 21 Jan '15, 05:41

question was seen: 3,390 times

last updated: 22 Jan '15, 16:05

p​o​w​e​r​e​d by O​S​Q​A