aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcswils.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-04-23 10:59:26 +0000
committerGuy Harris <guy@alum.mit.edu>2007-04-23 10:59:26 +0000
commit1bc049906a35c3490532ab68fcbf90750c225f77 (patch)
treef690697725617a640820ade652da4cf766bdc863 /epan/dissectors/packet-fcswils.c
parent7dc9df5f26ed136405fd1e99d62ebc3a6bf92dd5 (diff)
Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set. If we turn on -pedantic, try turning on -Wno-long-long as well, so that it's not *so* pedantic that it rejects the 64-bit integral data types that we explicitly require. Constify a bunch of stuff, and make some other changes, to get rid of warnings. Clean up some indentation. svn path=/trunk/; revision=21526
Diffstat (limited to 'epan/dissectors/packet-fcswils.c')
-rw-r--r--epan/dissectors/packet-fcswils.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/epan/dissectors/packet-fcswils.c b/epan/dissectors/packet-fcswils.c
index 90b2be19b7..892e2d21ac 100644
--- a/epan/dissectors/packet-fcswils.c
+++ b/epan/dissectors/packet-fcswils.c
@@ -715,7 +715,7 @@ dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
- gchar *flags;
+ const gchar *flags;
fcswils_elp elp;
/* Response i.e. SW_ACC for an ELP has the same format as the request */
@@ -771,27 +771,29 @@ dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
flags="";
if (elp.cls1_svcparm[0] & 0x80) {
#define MAX_FLAGS_LEN 40
+ char *flagsbuf;
size_t stroff, returned_length;
- flags=ep_alloc(MAX_FLAGS_LEN);
+ flagsbuf=ep_alloc(MAX_FLAGS_LEN);
stroff = 0;
- flags[stroff]=0;
+ flagsbuf[stroff]=0;
- returned_length = g_snprintf (flags+stroff, MAX_FLAGS_LEN-stroff,
+ returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff,
"Class 1 Valid");
stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
if (elp.cls1_svcparm[0] & 0x40) {
- returned_length = g_snprintf (flags+stroff, MAX_FLAGS_LEN-stroff, " | IMX");
+ returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | IMX");
stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
}
if (elp.cls1_svcparm[0] & 0x20) {
- returned_length = g_snprintf (flags+stroff, MAX_FLAGS_LEN-stroff, " | IPS");
+ returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | IPS");
stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
}
if (elp.cls1_svcparm[0] & 0x10) {
- returned_length = g_snprintf (flags+stroff, MAX_FLAGS_LEN-stroff, " | LKS");
+ returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | LKS");
stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
}
+ flags=flagsbuf;
}
else {
flags="Class 1 Invalid";