aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-synphasor.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-19 22:03:00 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-19 22:03:00 +0000
commitae747e4c4b34c2d6889df335a439b9fba77538d0 (patch)
tree3586ed7bc3e608af6db8bf6eff87fb3990c45b35 /epan/dissectors/packet-synphasor.c
parent7c56677cf9e703e6dde30529b24e27dd2a4960a9 (diff)
From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48430
Diffstat (limited to 'epan/dissectors/packet-synphasor.c')
-rw-r--r--epan/dissectors/packet-synphasor.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-synphasor.c b/epan/dissectors/packet-synphasor.c
index 7324ba25b0..8e5fe8f9ec 100644
--- a/epan/dissectors/packet-synphasor.c
+++ b/epan/dissectors/packet-synphasor.c
@@ -126,12 +126,14 @@ typedef enum { integer, /* 16 bit signed integer */
floating_point /* single precision floating point */
} data_format;
-typedef enum { rect, polar } phasor_notation;
+typedef enum { rect, polar } phasor_notation_e;
+
+typedef enum { V, A } unit_e;
/* holds the information required to dissect a single phasor */
typedef struct {
char name[CHNAM_LEN + 1];
- enum { V, A } unit;
+ unit_e unit;
guint32 conv; /* conversation factor in 10^-5 scale */
} phasor_info;
@@ -148,7 +150,7 @@ typedef struct {
data_format format_fr; /* data format of FREQ and DFREQ */
data_format format_ph; /* data format of PHASORS */
data_format format_an; /* data format of ANALOG */
- phasor_notation phasor_notation; /* format of the phasors */
+ phasor_notation_e phasor_notation; /* format of the phasors */
guint fnom; /* nominal line frequency */
guint num_dg; /* number of digital status words */
GArray *phasors; /* array of phasor_infos */
@@ -551,7 +553,7 @@ static void dissect_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
0);
if (conversation) {
- config_frame *conf = conversation_get_proto_data(conversation, proto_synphasor);
+ config_frame *conf = (config_frame *)conversation_get_proto_data(conversation, proto_synphasor);
/* no problem if 'conf' is NULL, the DATA frame dissector checks this again */
p_add_proto_data(pinfo->fd, proto_synphasor, conf);
}
@@ -792,7 +794,7 @@ static int dissect_data_frame(tvbuff_t *tvb,
/* search for configuration information to dissect the frame */
{
gboolean config_found = FALSE;
- conf = p_get_proto_data(pinfo->fd, proto_synphasor);
+ conf = (config_frame *)p_get_proto_data(pinfo->fd, proto_synphasor);
if (conf) {
/* check if the size of the current frame is the
@@ -891,7 +893,7 @@ static int dissect_command_frame(tvbuff_t *tvb,
static int dissect_single_phasor(tvbuff_t *tvb, int offset,
double* mag, double* phase, /* returns the resulting values here */
data_format format, /* information needed to... */
- phasor_notation notation) /* ...dissect the phasor */
+ phasor_notation_e notation) /* ...dissect the phasor */
{
if (floating_point == format) {
if (polar == notation) {