Wireshark-dev: Re: [Wireshark-dev] packet-lorawan.c compile error because of stuff added yester

From: Erik de Jong <erikdejong@xxxxxxxxx>
Date: Tue, 13 Jun 2017 22:54:25 +0200
Yes, that got messed up quite a bit in certain situations. Is it possible to have a petridish build for OSX as well? That's where the issue came from originally and why it got into the master branch.

Erik

On Tue, Jun 13, 2017 at 10:50 PM, Pascal Quantin <pascal.quantin@xxxxxxxxx> wrote:


2017-06-13 22:33 GMT+02:00 Pascal Quantin <pascal.quantin@xxxxxxxxx>:
Hi Richard,

2017-06-13 22:29 GMT+02:00 Richard Sharpe <realrichardsharpe@xxxxxxxxx>:
Hi folks,

After I did a git pull, I started getting this error:

  CC       packet-lorawan.lo
packet-lorawan.c: In function 'dissect_lorawan':
packet-lorawan.c:657:7: error: variable 'frame_length' set but not
used [-Werror=unused-but-set-variable]
  gint frame_length;

Seems to be related to this:

        frame_length = current_offset;
+#if GCRYPT_VERSION_NUMBER >= 0x010600 /* 1.6.0 */
        if (encryption_keys) {
                guint8 *msg = (guint8
*)wmem_alloc0(wmem_packet_scope(), frame_length + 16);
                msg[0] = 0x49;
@@ -824,7 +833,9 @@ dissect_lorawan(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree _U_, void *d
                if (calculate_mic(msg, frame_length + 16,
encryption_keys->nwkskey->data) != tvb_get_guint32(tvb,
current_offset, ENC_LITTLE_ENDIAN)) {
                        proto_tree_add_expert_format(lorawan_tree,
pinfo, &ei_lorawan_invalid_crc, tvb, current_offset, 4, "Invalid
CRC");
                }
-       } else {
+       } else
+#endif
+       {

It's a bit rude to cause build errors just because I don't have gcrypt
1.6.0 or above.

This is currently under process: https://code.wireshark.org/review/#/c/22098

Could you check is the latest patch iteration works on your machine?

Thanks,
Pascal.


Pascal.


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe