diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-02-15 19:25:05 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-02-16 03:27:44 +0000 |
commit | e56f34e2005885dfe56834c11f1ff2b698d6d7e4 (patch) | |
tree | 2889ef1fe4b8691869666c7bd4458e5b9d0c4869 /epan/dissectors | |
parent | 7c3fd2a6903ced8adb89659a4105d22031442edf (diff) | |
download | wireshark-e56f34e2005885dfe56834c11f1ff2b698d6d7e4.tar.gz |
Suppress more pedantic warnings.
Suppress
warning: initialization of a flexible array member [-Wpedantic]
Change-Id: I49c2cf8b97539660742ef1b19752a0f56404d78a
Reviewed-on: https://code.wireshark.org/review/7155
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-asterix.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/epan/dissectors/packet-asterix.c b/epan/dissectors/packet-asterix.c index 167600a894..c54a93dc50 100644 --- a/epan/dissectors/packet-asterix.c +++ b/epan/dissectors/packet-asterix.c @@ -26,6 +26,9 @@ #include <epan/packet.h> #include <epan/prefs.h> + +#include <wsutil/ws_diag_control.h> + void proto_register_asterix(void); void proto_reg_handoff_asterix(void); @@ -2385,6 +2388,7 @@ struct FieldPart_s { const char *format_string; /* format string for showing float values */ }; +DIAG_OFF(pedantic) typedef struct AsterixField_s AsterixField; struct AsterixField_s { guint8 type; /* type of field */ @@ -2395,6 +2399,7 @@ struct AsterixField_s { const FieldPart **part; /* Look declaration and description of FieldPart above. */ const AsterixField *field[]; /* subfields */ }; +DIAG_ON(pedantic) static void dissect_asterix (tvbuff_t *, packet_info *, proto_tree *); static void dissect_asterix_packet (tvbuff_t *, proto_tree *); @@ -2461,7 +2466,9 @@ static const FieldPart IXXX_BDS2 = { 4, 1.0, FIELD_PART_UINT, &hf_XXX_BDS2, NULL static const FieldPart *IXXX_MB[] = { &IXXX_MB_DATA, &IXXX_BDS1, &IXXX_BDS2, NULL }; /* Spare Item */ +DIAG_OFF(pedantic) static const AsterixField IX_SPARE = { FIXED, 0, 0, 0, &hf_spare, NULL, { NULL } }; +DIAG_ON(pedantic) /* *********************** */ /* Category 001 */ @@ -2684,6 +2691,7 @@ static const FieldPart *I001_170_PARTS[] = { &I001_170_CON, &I001_170_RAD, &I001 &I001_170_TRE, &IXXX_6bit_spare, &IXXX_FX, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I001_010 = { FIXED, 2, 0, 0, &hf_001_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I001_020 = { FX + UAP, 1, 0, 0, &hf_001_020, I001_020_PARTS, { NULL } }; static const AsterixField I001_030 = { FX, 1, 0, 0, &hf_001_030, I001_030_PARTS, { NULL } }; @@ -2718,6 +2726,7 @@ static const AsterixField *I001_TRACK_v1_2_uap[] = { &I001_010, &I001_020, &I001 /* array of two (PLOT, TRACK) is for two different user application profiles (UAPs) */ static const AsterixField **I001_v1_2[] = { I001_PLOT_v1_2_uap, I001_TRACK_v1_2_uap, NULL }; static const AsterixField ***I001[] = { I001_v1_2 }; +DIAG_ON(pedantic) static const enum_val_t I001_versions[] = { { "I001_v1_2", "Version 1.2", 0 }, @@ -2783,6 +2792,7 @@ static const FieldPart I002_100_THETAE = { 16, 360.0/65536.0, FIELD_PART_UFLOAT, static const FieldPart *I002_100_PARTS[] = { &I002_100_RHOS, &I002_100_RHOE, &I002_100_THETAS, &I002_100_THETAE, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I002_000 = { FIXED, 1, 0, 0, &hf_002_000, I002_000_PARTS, { NULL } }; static const AsterixField I002_010 = { FIXED, 2, 0, 0, &hf_002_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I002_020 = { FIXED, 1, 0, 0, &hf_002_020, I002_020_PARTS, { NULL } }; @@ -2801,6 +2811,7 @@ static const AsterixField *I002_v1_0_uap[] = { &I002_010, &I002_000, &I002_020, &I002_070, &I002_100, &I002_090, &I002_080, &IX_SPARE, &I002_SP, &I002_RE, NULL }; static const AsterixField **I002_v1_0[] = { I002_v1_0_uap, NULL }; static const AsterixField ***I002[] = { I002_v1_0 }; +DIAG_ON(pedantic) static const enum_val_t I002_versions[] = { { "I002_v1_0", "Version 1.0", 0 }, @@ -2920,6 +2931,7 @@ static const FieldPart I008_120_COUNT = { 16, 1.0, FIELD_PART_UINT, &hf_008_120_ static const FieldPart *I008_120_PARTS[] = { &I008_120_COUNT, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I008_000 = { FIXED, 1, 0, 0, &hf_008_000, I008_000_PARTS, { NULL } }; static const AsterixField I008_010 = { FIXED, 2, 0, 0, &hf_008_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I008_020 = { FX, 1, 0, 0, &hf_008_020, I008_020_PARTS, { NULL } }; @@ -2939,6 +2951,7 @@ static const AsterixField *I008_v1_1_uap[] = { &I008_010, &I008_000, &I008_020, &I008_090, &I008_100, &I008_110, &I008_120, &I008_038, &I008_SP, &I008_RFS, NULL }; static const AsterixField **I008_v1_1[] = { I008_v1_1_uap, NULL }; static const AsterixField ***I008[] = { I008_v1_1 }; +DIAG_ON(pedantic) static const enum_val_t I008_versions[] = { { "I008_v1_1", "Version 1.1", 0 }, @@ -3016,6 +3029,7 @@ static const FieldPart I009_100_VC = { 16, 1.0, FIELD_PART_UINT, &hf_009_100_VC, static const FieldPart *I009_100_PARTS[] = { &I009_100_VC, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I009_000 = { FIXED, 1, 0, 0, &hf_009_000, I009_000_PARTS, { NULL } }; static const AsterixField I009_010 = { FIXED, 2, 0, 0, &hf_009_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I009_020 = { FX, 1, 0, 0, &hf_009_020, I009_020_PARTS, { NULL } }; @@ -3030,6 +3044,7 @@ static const AsterixField *I009_v2_0_uap[] = { &I009_010, &I009_000, &I009_020, &I009_090, &I009_100, NULL }; static const AsterixField **I009_v2_0[] = { I009_v2_0_uap, NULL }; static const AsterixField ***I009[] = { I009_v2_0 }; +DIAG_ON(pedantic) static const enum_val_t I009_versions[] = { { "I009_v2_0", "Version 2.0", 0 }, @@ -3656,6 +3671,7 @@ static const FieldPart I021_400_RID = { 8, 1.0, FIELD_PART_UINT, &hf_021_400_RID static const FieldPart *I021_400_PARTS[] = { &I021_400_RID, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I021_008 = { FIXED, 1, 0, 0, &hf_021_008, I021_008_PARTS, { NULL } }; static const AsterixField I021_010 = { FIXED, 2, 0, 0, &hf_021_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I021_015 = { FIXED, 1, 0, 0, &hf_021_015, I021_015_PARTS, { NULL } }; @@ -3768,6 +3784,7 @@ static const AsterixField *I021_v2_1_uap[] = { &I021_010, &I021_040, &I021_161, &IX_SPARE, &IX_SPARE, &IX_SPARE, &IX_SPARE, &IX_SPARE, &I021_RE, &I021_SP, NULL }; static const AsterixField **I021_v2_1[] = { I021_v2_1_uap, NULL }; static const AsterixField ***I021[] = { I021_v2_1 }; +DIAG_ON(pedantic) static const enum_val_t I021_versions[] = { { "I021_v2_1", "Version 2.1", 0 }, @@ -3921,6 +3938,7 @@ static const FieldPart I023_200_RANGE = { 8, 1.0, FIELD_PART_UFLOAT, &hf_023_200 static const FieldPart *I023_200_PARTS[] = { &I023_200_RANGE, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I023_000 = { FIXED, 1, 0, 0, &hf_023_000, I023_000_PARTS, { NULL } }; static const AsterixField I023_010 = { FIXED, 2, 0, 0, &hf_023_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I023_015 = { FIXED, 1, 0, 0, &hf_023_015, I023_015_PARTS, { NULL } }; @@ -3937,6 +3955,7 @@ static const AsterixField *I023_v1_2_uap[] = { &I023_010, &I023_000, &I023_015, &I023_110, &I023_120, &IX_SPARE, &IX_SPARE, &IX_SPARE, &I023_RE, &I023_SP, NULL }; static const AsterixField **I023_v1_2[] = { I023_v1_2_uap, NULL }; static const AsterixField ***I023[] = { I023_v1_2 }; +DIAG_ON(pedantic) static const enum_val_t I023_versions[] = { { "I023_v1_2", "Version 1.2", 0 }, @@ -4221,6 +4240,7 @@ static const FieldPart I034_120_LON = { 24, 180.0/8388608.0, FIELD_PART_FLOAT, & static const FieldPart *I034_120_PARTS[] = { &I034_120_H, &I034_120_LAT, &I034_120_LON, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I034_000 = { FIXED, 1, 0, 0, &hf_034_000, I034_000_PARTS, { NULL } }; static const AsterixField I034_010 = { FIXED, 2, 0, 0, &hf_034_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I034_020 = { FIXED, 1, 0, 0, &hf_034_020, I034_020_PARTS, { NULL } }; @@ -4260,6 +4280,7 @@ static const AsterixField *I034_v1_27_uap[] = { &I034_010, &I034_000, &I034_030, &I034_070, &I034_100, &I034_110, &I034_120, &I034_090, &I034_RE, &I034_SP, NULL }; static const AsterixField **I034_v1_27[] = { I034_v1_27_uap, NULL }; static const AsterixField ***I034[] = { I034_v1_27 }; +DIAG_ON(pedantic) static const enum_val_t I034_versions[] = { { "I034_v1_27", "Version 1.27", 0 }, @@ -4738,6 +4759,7 @@ static const FieldPart I048_260_ACAS = { 56, 1.0, FIELD_PART_HEX, &hf_048_260_AC static const FieldPart *I048_260_PARTS[] = { &I048_260_ACAS, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I048_010 = { FIXED, 2, 0, 0, &hf_048_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I048_020 = { FX, 1, 0, 0, &hf_048_020, I048_020_PARTS, { NULL } }; static const AsterixField I048_030 = { FX, 1, 0, 0, &hf_048_030, I048_030_PARTS, { NULL } }; @@ -4791,6 +4813,7 @@ static const AsterixField *I048_v1_17_uap[] = { &I048_010, &I048_140, &I048_020, &I048_260, &I048_055, &I048_050, &I048_065, &I048_060, &I048_RE, &I048_SP, NULL }; static const AsterixField **I048_v1_17[] = { I048_v1_17_uap, NULL }; static const AsterixField ***I048[] = { I048_v1_17 }; +DIAG_ON(pedantic) static const enum_val_t I048_versions[] = { { "I048_v1_17", "Version 1.17", 0 }, @@ -6140,6 +6163,7 @@ static const FieldPart *I062_RE_STS_PARTS[] = { &I062_RE_STS_FDR, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I062_010 = { FIXED, 2, 0, 0, &hf_062_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I062_015 = { FIXED, 1, 0, 0, &hf_062_015, I062_015_PARTS, { NULL } }; static const AsterixField I062_040 = { FIXED, 2, 0, 0, &hf_062_040, IXXX_TN_16_PARTS, { NULL } }; @@ -6459,6 +6483,7 @@ static const AsterixField *I062_v0_17_uap[] = { &I062_010, &I062_015, &I062_070, static const AsterixField **I062_v1_16[] = { I062_v1_16_uap, NULL }; static const AsterixField **I062_v0_17[] = { I062_v0_17_uap, NULL }; static const AsterixField ***I062[] = { I062_v1_16, I062_v0_17 }; +DIAG_ON(pedantic) static const enum_val_t I062_versions[] = { { "I062_v1_16", "Version 1.16", 0 }, @@ -6592,6 +6617,7 @@ static const FieldPart I063_092_PEB = { 16, 360.0 / 65536.0, FIELD_PART_FLOAT, & static const FieldPart *I063_092_PARTS[] = { &I063_092_PEB, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I063_010 = { FIXED, 2, 0, 0, &hf_063_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I063_015 = { FIXED, 1, 0, 0, &hf_063_015, I063_015_PARTS, { NULL } }; static const AsterixField I063_030 = { FIXED, 3, 0, 0, &hf_063_030, IXXX_TOD, { NULL } }; @@ -6610,6 +6636,7 @@ static const AsterixField *I063_v1_3_uap[] = { &I063_010, &I063_015, &I063_030, &I063_081, &I063_090, &I063_091, &I063_092, &IX_SPARE, &I063_RE, &I063_SP, NULL }; static const AsterixField **I063_v1_3[] = { I063_v1_3_uap, NULL }; static const AsterixField ***I063[] = { I063_v1_3 }; +DIAG_ON(pedantic) static const enum_val_t I063_versions[] = { { "I063_v1_3", "Version 1.3", 0 }, @@ -6700,6 +6727,7 @@ static const FieldPart I065_050_REP = { 8, 1.0, FIELD_PART_UINT, &hf_065_050_REP static const FieldPart *I065_050_PARTS[] = { &I065_050_REP, NULL }; /* Items */ +DIAG_OFF(pedantic) static const AsterixField I065_000 = { FIXED, 1, 0, 0, &hf_065_000, I065_000_PARTS, { NULL } }; static const AsterixField I065_010 = { FIXED, 2, 0, 0, &hf_065_010, IXXX_SAC_SIC, { NULL } }; static const AsterixField I065_015 = { FIXED, 1, 0, 0, &hf_065_015, I065_015_PARTS, { NULL } }; @@ -6714,6 +6742,7 @@ static const AsterixField *I065_v1_3_uap[] = { &I065_010, &I065_000, &I065_015, &IX_SPARE, &IX_SPARE, &IX_SPARE, &IX_SPARE, &IX_SPARE, &I065_RE, &I065_SP, NULL }; static const AsterixField **I065_v1_3[] = { I065_v1_3_uap, NULL }; static const AsterixField ***I065[] = { I065_v1_3 }; +DIAG_ON(pedantic) static const enum_val_t I065_versions[] = { { "I065_v1_3", "Version 1.3", 0 }, |