diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-09-11 11:22:23 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-09-11 11:22:23 +0000 |
commit | cfabed738a0eb4633169e99f1426f7c705def7b4 (patch) | |
tree | 0195786f77fc545510cdb618e7d2c0b25e006e84 /epan/dissectors | |
parent | c4438f135f351887d4dd39286b878bfdbba03c9b (diff) |
When pre-declaring variables, use the right type.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29856 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rwxr-xr-x | epan/dissectors/process-x11-xcb.pl | 8 | ||||
-rw-r--r-- | epan/dissectors/x11-extension-implementation.h | 34 |
2 files changed, 24 insertions, 18 deletions
diff --git a/epan/dissectors/process-x11-xcb.pl b/epan/dissectors/process-x11-xcb.pl index c4133c3dc9..dfac652efb 100755 --- a/epan/dissectors/process-x11-xcb.pl +++ b/epan/dissectors/process-x11-xcb.pl @@ -442,7 +442,13 @@ sub register_element($$$;$) if ($e->name() eq 'field') { if ($basictype{$type} or $simpletype{$type}) { # Pre-declare variable - print $impl $indent."int f_$fieldname;\n"; + if ($ft eq 'FT_FLOAT') { + print $impl $indent."gfloat f_$fieldname;\n"; + } elsif ($ft eq 'FT_DOUBLE') { + print $impl $indent."gdouble f_$fieldname;\n"; + } else { + print $impl $indent."int f_$fieldname;\n"; + } } } } diff --git a/epan/dissectors/x11-extension-implementation.h b/epan/dissectors/x11-extension-implementation.h index 323c629d7a..afdf48e382 100644 --- a/epan/dissectors/x11-extension-implementation.h +++ b/epan/dissectors/x11-extension-implementation.h @@ -6992,7 +6992,7 @@ static void glxPixelStoref(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, { int f_context_tag; int f_pname; - int f_datum; + gfloat f_datum; f_context_tag = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_glx_PixelStoref_context_tag, tvb, *offsetp, 4, little_endian); *offsetp += 4; @@ -7165,7 +7165,7 @@ static void glxGetDoublev_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, { int f_length, length, sequence_number; int f_n; - int f_datum; + gdouble f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDoublev"); @@ -7234,7 +7234,7 @@ static void glxGetFloatv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetFloatv"); @@ -7318,7 +7318,7 @@ static void glxGetLightfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetLightfv"); @@ -7406,7 +7406,7 @@ static void glxGetMapdv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, p { int f_length, length, sequence_number; int f_n; - int f_datum; + gdouble f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMapdv"); @@ -7450,7 +7450,7 @@ static void glxGetMapfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, p { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMapfv"); @@ -7538,7 +7538,7 @@ static void glxGetMaterialfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offse { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMaterialfv"); @@ -7622,7 +7622,7 @@ static void glxGetPixelMapfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offse { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPixelMapfv"); @@ -7813,7 +7813,7 @@ static void glxGetTexEnvfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexEnvfv"); @@ -7901,7 +7901,7 @@ static void glxGetTexGendv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp { int f_length, length, sequence_number; int f_n; - int f_datum; + gdouble f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexGendv"); @@ -7945,7 +7945,7 @@ static void glxGetTexGenfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexGenfv"); @@ -8093,7 +8093,7 @@ static void glxGetTexParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *o { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexParameterfv"); @@ -8185,7 +8185,7 @@ static void glxGetTexLevelParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, i { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexLevelParameterfv"); @@ -8481,7 +8481,7 @@ static void glxGetColorTableParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetColorTableParameterfv"); @@ -8621,7 +8621,7 @@ static void glxGetConvolutionParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetConvolutionParameterfv"); @@ -8813,7 +8813,7 @@ static void glxGetHistogramParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetHistogramParameterfv"); @@ -8948,7 +8948,7 @@ static void glxGetMinmaxParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int { int f_length, length, sequence_number; int f_n; - int f_datum; + gfloat f_datum; col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMinmaxParameterfv"); |