diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-03-17 08:46:56 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-03-17 08:46:56 +0000 |
commit | 3982157d535983e4d9c5b2d91aba553cbedb87e3 (patch) | |
tree | 6aa7c788fe89ca233b916f6897bea4374080522e /packet-gsm_map.c | |
parent | bd9422d92bedac9be73eb935c18d08baedbe4759 (diff) |
Unfortunately, GCC 2.8.1 on x86/Solaris 7 doesn't do enough
compile-time optimization; in particular, if you call
GSM_MAP_PARAM_DISPLAY with a Gtag argument of GSM_MAP_P_NONE, the
compiler does figure out that it only need generate code for the first
branch for the first if in that macro, and it sort of seems to
understand that _param_fcn is guaranteed to be null, but it doesn't
optimize out the test and the branch for _param_fcn not being null - it
does, however, generate a call to location 0, which, when you compile as
position-independent code, the assembler refuses to assemble.
Therefore, we put into the test for _param_fcn being null an additional
test for Ga1 being GSM_MAP_P_NONE, which at least manages to get the
code through the compiler.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10388 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-gsm_map.c')
-rw-r--r-- | packet-gsm_map.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-gsm_map.c b/packet-gsm_map.c index c8eadf3b07..9f1ab8a244 100644 --- a/packet-gsm_map.c +++ b/packet-gsm_map.c @@ -7,7 +7,7 @@ * Changed to run on new version of TCAP, many changes for * EOC matching, and parameter separation. (2003) * - * $Id: packet-gsm_map.c,v 1.7 2004/03/05 10:08:13 guy Exp $ + * $Id: packet-gsm_map.c,v 1.8 2004/03/17 08:46:56 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1192,7 +1192,7 @@ static int *param_1_hf[] = { \ if (_len > 0) \ { \ - if (_param_fcn == NULL) \ + if (Ga1 == GSM_MAP_P_NONE || _param_fcn == NULL) \ { \ proto_tree_add_text(_subtree, asn1->tvb, \ asn1->offset, _len, "Parameter Data"); \ |