ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] buildbot failure in Wireshark (developme

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sat, 10 Aug 2013 15:27:39 -0700
On Aug 10, 2013, at 2:32 PM, Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx> wrote:

> Sorry, I don't understand these warning messages...

Those are the ones I fixed.

As per my comment:

In C, a floating-point constant is a double, unless explicitly made float by an "f" suffix; to quote the C90 spec:

	An unsuffixed floating constant has type double. If suffixed by the letter f or F, it has type float. If suffixed by the letter l or L, it has type long double.

GCC and Clang, when run with -Wshorten-64-to-32, will warn about assigning a double value to a float, as well as assigning a 64-bit integer value to a 32-bit integer.  (I wish there were a general -Wshorten, that *also* warned about 32-bit integer values and 16-bit integers and about 16-bit integer values and 8-bit integers, so that those warnings will be caught with GCC/Clang as well as MSVC.)