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

Wireshark-dev: [Wireshark-dev] Compilation warning (error on Win) fix for packet-scsi.c

From: "Peter Johansson" <peterjohansson73@xxxxxxxxx>
Date: Tue, 27 Mar 2007 14:28:52 +0200
This patch takes care of a compilation warning that produces a compilation error on Windows (due to the newly introduced /WX compiler option).
 
Regards, Peter
Index: C:/wireshark-win32-libs/epan/dissectors/packet-scsi.c
===================================================================
--- C:/wireshark-win32-libs/epan/dissectors/packet-scsi.c	(revision 21226)
+++ C:/wireshark-win32-libs/epan/dissectors/packet-scsi.c	(working copy)
@@ -4646,7 +4646,7 @@
     /* If this PDU already contains all the expected data we dont have to do
      * reassembly.
      */
-    if( (!relative_offset) && (tvb_length_remaining(tvb, offset)==expected_length) ){
+    if( (!relative_offset) && ((guint32)tvb_length_remaining(tvb, offset) == expected_length) ){
         goto dissect_the_payload;
     }