Wrap actual_len inside #ifdef DEBUG_K12 to avoid gcc 4.6.0 warning reported by
authorcmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 18 Apr 2011 20:03:32 +0000 (20:03 +0000)
committercmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 18 Apr 2011 20:03:32 +0000 (20:03 +0000)
Kaul: http://www.wireshark.org/lists/wireshark-dev/201104/msg00170.html

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36710 f5534014-38df-0310-8fa8-9805f1628bb7

wiretap/k12.c

index 300f92fbb25f2f6649f37812594b760afd405077..fda91d1743d67e0b6e53d89497331e3909fcb2b2 100644 (file)
@@ -272,9 +272,12 @@ static gint get_record(guint8** bufferp, FILE_T fh, gint64 file_offset,
     static guint buffer_len = 0x2000 ;
     guint bytes_read;
     guint last_read;
-    guint actual_len, left;
+    guint left;
     guint8 junk[0x14];
     guint8* writep;
+#ifdef DEBUG_K12
+    guint actual_len;
+#endif
 
     /* where the next unknown 0x10 bytes are stuffed to the file */
     guint junky_offset = 0x2000 - (gint) ( (file_offset - 0x200) % 0x2000 );
@@ -323,7 +326,10 @@ static gint get_record(guint8** bufferp, FILE_T fh, gint64 file_offset,
         }
     }
 
-    actual_len = left = pntohl(buffer);
+    left = pntohl(buffer);
+#ifdef DEBUG_K12
+    actual_len = left;
+#endif
     junky_offset -= 0x4;
 
     K12_DBG(5,("get_record: GET length=%u",left));