diff options
author | Richard van der Hoff <richardv@mxtelecom.com> | 2007-04-03 01:45:59 +0000 |
---|---|---|
committer | Richard van der Hoff <richardv@mxtelecom.com> | 2007-04-03 01:45:59 +0000 |
commit | 606a756714dee24adc1f96d8a08f58e8efd70622 (patch) | |
tree | 74ee3d0081ed73ce9c1794c598d7de2bd58606a3 /epan | |
parent | 2c14858aefc421406e36941f25b93542a843b6b1 (diff) |
From me:
fix compiler warnings in tvbtest.c
svn path=/trunk/; revision=21306
Diffstat (limited to 'epan')
-rw-r--r-- | epan/tvbtest.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/epan/tvbtest.c b/epan/tvbtest.c index 80e624cc58..bfdd2a6dda 100644 --- a/epan/tvbtest.c +++ b/epan/tvbtest.c @@ -36,11 +36,12 @@ test(tvbuff_t *tvb, gchar* name, guint8* expected_data, guint expected_length) { guint length; + const guint8 *cptr; guint8 *ptr; volatile gboolean ex_thrown; volatile guint32 val32; guint32 expected32; - int incr, i; + guint incr, i; length = tvb_length(tvb); @@ -53,7 +54,7 @@ test(tvbuff_t *tvb, gchar* name, /* Test boundary case. A BoundsError exception should be thrown. */ ex_thrown = FALSE; TRY { - ptr = tvb_get_ptr(tvb, 0, length + 1); + cptr = tvb_get_ptr(tvb, 0, length + 1); } CATCH(BoundsError) { ex_thrown = TRUE; @@ -73,7 +74,7 @@ test(tvbuff_t *tvb, gchar* name, exception should be thrown. */ ex_thrown = FALSE; TRY { - ptr = tvb_get_ptr(tvb, 0, length + 2); + cptr = tvb_get_ptr(tvb, 0, length + 2); } CATCH(BoundsError) { printf("03: Caught wrong exception: BoundsError\n"); @@ -92,7 +93,7 @@ test(tvbuff_t *tvb, gchar* name, /* Test boundary case. A BoundsError exception should be thrown. */ ex_thrown = FALSE; TRY { - ptr = tvb_get_ptr(tvb, -1, 2); + cptr = tvb_get_ptr(tvb, -1, 2); } CATCH(BoundsError) { ex_thrown = TRUE; @@ -111,7 +112,7 @@ test(tvbuff_t *tvb, gchar* name, /* Test boundary case. A BoundsError exception should not be thrown. */ ex_thrown = FALSE; TRY { - ptr = tvb_get_ptr(tvb, 0, 1); + cptr = tvb_get_ptr(tvb, 0, 1); } CATCH(BoundsError) { ex_thrown = TRUE; @@ -130,7 +131,7 @@ test(tvbuff_t *tvb, gchar* name, /* Test boundary case. A BoundsError exception should not be thrown. */ ex_thrown = FALSE; TRY { - ptr = tvb_get_ptr(tvb, -1, 1); + cptr = tvb_get_ptr(tvb, -1, 1); } CATCH(BoundsError) { ex_thrown = TRUE; |