Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Stig Bjørlykke
On Thu, Oct 20, 2022 at 6:54 PM Fulko Hew wrote: > My guess as to what could be wrong according to the error is that > ba[i] < '\0' is 'always false' because ba (although declared as a > QByteArray) is probably > an unsigned byte array, and as such a value can never be less than zero. > It's

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Gerald Combs
On 10/20/22 9:54 AM, Fulko Hew wrote: [ ... ] Now how to fix it is another story. My first crack at it would be to disable that warning. My second approach would be to correct that test (as appropriate). Another question might be why this is an error instead of a warning. ENABLE_WERROR is

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Fulko Hew
On Thu, Oct 20, 2022 at 11:22 AM w...@comcast.net wrote: > I can't compile wireshark version 4.0 on Raspberry Pi ubuntu 22.04 > > Here is the error from make. > > I've attached cmake success and make error logs.txt, CMakeError.log and > CMakeOutput.log > > [ 84%] Building CXX object

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Maynard, Christopher via Wireshark-dev
I suppose it's complaining about this test as always evaluating to false: ba[i] < '\0' What if you simply remove that part, does it compile then? - Chris From: Wireshark-dev On Behalf Of w...@comcast.net Sent: Wednesday, October 19, 2022 10:17 AM To: wireshark-dev@wireshark.org;

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Guy Harris
On Oct 20, 2022, at 5:15 PM, Guy Harris wrote: > Or just > if (!g_ascii_isprint(ba[i])) { > > as g_ascii_isprint() 1) is a macro, so no subroutine call overhead and 2) > already correctly handles both signed and unsigned char. Nope, do if (!g_ascii_isprint(ba[i]) &&

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Guy Harris
On Oct 20, 2022, at 9:54 AM, Fulko Hew wrote: > My guess as to what could be wrong according to the error is that > ba[i] < '\0' is 'always false' because ba (although declared as a > QByteArray) is probably > an unsigned byte array, Qt 5.12.12 qbytearray.h: inline char *data();

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Guy Harris
On Oct 20, 2022, at 4:02 PM, Guy Harris wrote: > Definitely signed, unless I'm missing something. Please hand me the Sad Old Man With Fading Memory prize of the year. *Nothing guarantees that a char is signed*. This is still true as of C18: An object declared as type char is large

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Guy Harris
On Oct 20, 2022, at 4:31 PM, Guy Harris wrote: > #if CHAR_MIN == 0 > #define CHAR_VALUE_IS_NEGATIVE(c) (0) > #else > #define CHAR_VALUE_IS_NEGATIVE(c) ((c) < 0) > #endif > > if ((CHAR_VALUE_IS_NEGAIVE(ba[i]) || ba[i] >= ' ') &&

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Roland Knall
Please attach your cmake outputAm 20.10.2022 um 17:30 schrieb chuck c :Can you add a link to the source bundle you downloaded.On Thu, Oct 20, 2022 at 10:22 AM w...@comcast.net wrote: I can't compile wireshark version 4.0 on Raspberry Pi ubuntu 22.04

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread chuck c
Can you add a link to the source bundle you downloaded. On Thu, Oct 20, 2022 at 10:22 AM w...@comcast.net wrote: > I can't compile wireshark version 4.0 on Raspberry Pi ubuntu 22.04 > > Here is the error from make. > > I've attached cmake success and make error logs.txt, CMakeError.log and >