Squelch some compiler const vs. non-const warnings.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Dec 2005 22:59:30 +0000 (22:59 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Dec 2005 22:59:30 +0000 (22:59 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16710 f5534014-38df-0310-8fa8-9805f1628bb7

13 files changed:
asn1/cms/cms.cnf
asn1/x411/packet-x411-template.c
asn1/x411/x411.cnf
asn1/x420/x420.cnf
asn1/x509af/x509af.cnf
epan/dissectors/packet-cms.c
epan/dissectors/packet-cms.h
epan/dissectors/packet-x411.c
epan/dissectors/packet-x411.h
epan/dissectors/packet-x420.c
epan/dissectors/packet-x420.h
epan/dissectors/packet-x509af.c
epan/dissectors/packet-x509af.h

index da70832aee45fbbc45af31ede46e3811ec39101e..5414cc51a4f33b60ace9b6ade8d86fc54e1ea768 100644 (file)
@@ -95,7 +95,7 @@ EncryptedContentInfo/contentType      encryptedContentType
   FN_VARIANT = _str  HF_INDEX = hf_cms_attrType  VAL_PTR = &object_identifier_id
 
 #.FN_BODY Attribute/attrType
-  char *name = NULL;
+  const char *name = NULL;
 
   %(DEFAULT_BODY)s
 
index 3d29f17662c519fc0bb77a51bc80011e843519d8..afa1266aa4c117481b28b16d2061ea656b3035fa 100644 (file)
@@ -81,7 +81,7 @@ static gint ett_x411 = -1;
 static int
 call_x411_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
 {
-  char *name = NULL;
+  const char *name = NULL;
   char extension_oid[BER_MAX_OID_STR_LEN];
 
   sprintf(extension_oid, "%s.%d", base_oid, extension_id);     
index 5e87310b243318dffec1acbb12885708e87d708f..3b8da2e174de8c6f477a8eb22031924b72433a84 100644 (file)
@@ -200,7 +200,7 @@ ReportDeliveryArgument      B       "2.6.1.4.14"    "id-et-report"
 /*XXX not implemented yet */
 
 #.FN_BODY ExtensionValue
-       char *name;
+       const char *name;
 
        if(extension_id != -1) 
                offset=call_x411_oid_callback("x411.extension", tvb, offset, pinfo, tree);
index 84d23123fd7bca1b4df81a7329792d813908a54d..d46da6e9c73a028641ce0b568e2e7991f4c94cef 100644 (file)
@@ -107,7 +107,7 @@ InformationObject           B "2.6.1.4.17.1.3.26.0.4406.0.4.1"      "id-et-content-p772"
        FN_VARIANT = _str  VAL_PTR = &object_identifier_id
 
 #.FN_BODY IPMSExtension/type
-  char *name = NULL;
+  const char *name = NULL;
 
   %(DEFAULT_BODY)s
   
index 182b1a6d486520eb19e98a4928d758487e19bd8e..7d1f44a244a85474c0afd844099917b0e05dff01 100644 (file)
@@ -71,7 +71,7 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate
   FN_VARIANT = _str  HF_INDEX = hf_x509af_algorithm_id  VAL_PTR = &algorithm_id
 
 #.FN_BODY AlgorithmIdentifier/algorithmId
-  char *name;
+  const char *name;
 
   %(DEFAULT_BODY)s
 
@@ -88,7 +88,7 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate
   FN_VARIANT = _str  HF_INDEX = hf_x509af_extension_id  VAL_PTR = &extension_id
 
 #.FN_BODY Extension/extnId
-  char *name;
+  const char *name;
 
   %(DEFAULT_BODY)s
 
index 80d0d6eb8c4c589f4a468d5bb09440ec715c1cd7..5dfaf33f324003d25aae78d0cd4d688c46e12190 100644 (file)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* .\packet-cms.c                                                             */
+/* ./packet-cms.c                                                             */
 /* ../../tools/asn2eth.py -X -b -e -p cms -c cms.cnf -s packet-cms-template CryptographicMessageSyntax.asn */
 
 /* Input file: packet-cms-template.c */
@@ -486,7 +486,7 @@ static int dissect_encapContentInfo(packet_info *pinfo, proto_tree *tree, tvbuff
 static int
 dissect_cms_T_attrType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
 #line 98 "cms.cnf"
-  char *name = NULL;
+  const char *name = NULL;
 
     offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_cms_attrType, &object_identifier_id);
 
index f6d28fdf81a8cd681408c0c109c786a4606a5848..175e43005e14fb6847b6cd9b67e434bc5037de7c 100644 (file)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* .\packet-cms.h                                                             */
+/* ./packet-cms.h                                                             */
 /* ../../tools/asn2eth.py -X -b -e -p cms -c cms.cnf -s packet-cms-template CryptographicMessageSyntax.asn */
 
 /* Input file: packet-cms-template.h */
index 1555473499d75a00abf1d0483e64152f3cf3fb8a..55829cbd5de935146f1ebac856dfcf0ff16194ea 100644 (file)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* .\packet-x411.c                                                            */
+/* ./packet-x411.c                                                            */
 /* ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */
 
 /* Input file: packet-x411-template.c */
@@ -2702,7 +2702,7 @@ static int dissect_criticality_impl(packet_info *pinfo, proto_tree *tree, tvbuff
 static int
 dissect_x411_ExtensionValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
 #line 203 "x411.cnf"
-       char *name;
+       const char *name;
 
        if(extension_id != -1) 
                offset=call_x411_oid_callback("x411.extension", tvb, offset, pinfo, tree);
@@ -6933,7 +6933,7 @@ static void dissect_PhysicalDeliveryOfficeName_PDU(tvbuff_t *tvb, packet_info *p
 static int
 call_x411_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
 {
-  char *name = NULL;
+  const char *name = NULL;
   char extension_oid[BER_MAX_OID_STR_LEN];
 
   sprintf(extension_oid, "%s.%d", base_oid, extension_id);     
index 632a6358e4a79b52b1137a7f913a99f04c3497b3..0f25ef2d1661b638b6b46b6bddcac0966db6060f 100644 (file)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* .\packet-x411.h                                                            */
+/* ./packet-x411.h                                                            */
 /* ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */
 
 /* Input file: packet-x411-template.h */
index f17746c8fa94a669afc65cbd2124d9fedac7c6eb..13182e243bb0b678e7d04dfcb4438d7fad3200a8 100644 (file)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* .\packet-x420.c                                                            */
+/* ./packet-x420.c                                                            */
 /* ../../tools/asn2eth.py -X -b -e -p x420 -c x420.cnf -s packet-x420-template x420.asn */
 
 /* Input file: packet-x420-template.c */
@@ -646,7 +646,7 @@ static int dissect_telex_compatible_impl(packet_info *pinfo, proto_tree *tree, t
 static int
 dissect_x420_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
 #line 110 "x420.cnf"
-  char *name = NULL;
+  const char *name = NULL;
 
     offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &object_identifier_id);
 
index 7f3e1a97116be075223760cc346f7e23127f41a8..96acdf698e2bbc25cfb077ec2b137e3f44982a66 100644 (file)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* .\packet-x420.h                                                            */
+/* ./packet-x420.h                                                            */
 /* ../../tools/asn2eth.py -X -b -e -p x420 -c x420.cnf -s packet-x420-template x420.asn */
 
 /* Input file: packet-x420-template.h */
index f68a04f48228ed16834816bc11b100bdf90ccb16..022c8f97a9b65048a55529fa3d1618d48a265e8c 100644 (file)
@@ -5,6 +5,7 @@
 
 /* Input file: packet-x509af-template.c */
 
+#line 1 "packet-x509af-template.c"
 /* packet-x509af.c
  * Routines for X.509 Authentication Framework packet dissection
  *  Ronnie Sahlberg 2004
@@ -57,7 +58,7 @@ static int hf_x509af_algorithm_id = -1;
 static int hf_x509af_extension_id = -1;
 
 /*--- Included file: packet-x509af-hf.c ---*/
-
+#line 1 "packet-x509af-hf.c"
 static int hf_x509af_Certificate_PDU = -1;        /* Certificate */
 static int hf_x509af_CertificatePair_PDU = -1;    /* CertificatePair */
 static int hf_x509af_CertificateList_PDU = -1;    /* CertificateList */
@@ -134,13 +135,13 @@ static int hf_x509af_q = -1;                      /* INTEGER */
 static int hf_x509af_g = -1;                      /* INTEGER */
 
 /*--- End of included file: packet-x509af-hf.c ---*/
-
+#line 52 "packet-x509af-template.c"
 
 /* Initialize the subtree pointers */
 static gint ett_pkix_crl = -1;
 
 /*--- Included file: packet-x509af-ett.c ---*/
-
+#line 1 "packet-x509af-ett.c"
 static gint ett_x509af_Certificate = -1;
 static gint ett_x509af_T_signedCertificate = -1;
 static gint ett_x509af_SubjectName = -1;
@@ -175,14 +176,14 @@ static gint ett_x509af_SET_OF_AttributeType = -1;
 static gint ett_x509af_DSS_Params = -1;
 
 /*--- End of included file: packet-x509af-ett.c ---*/
-
+#line 56 "packet-x509af-template.c"
 
 static const char *algorithm_id;
 static const char *extension_id;
 
 
 /*--- Included file: packet-x509af-fn.c ---*/
-
+#line 1 "packet-x509af-fn.c"
 /*--- Fields for imported types ---*/
 
 static int dissect_issuer(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -262,7 +263,8 @@ static int dissect_serial(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, i
 
 static int
 dissect_x509af_T_algorithmId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-  char *name;
+#line 74 "x509af.cnf"
+  const char *name;
 
     offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509af_algorithm_id, &algorithm_id);
 
@@ -274,6 +276,7 @@ dissect_x509af_T_algorithmId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offse
   }
 
 
+
   return offset;
 }
 static int dissect_algorithmId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -284,9 +287,11 @@ static int dissect_algorithmId(packet_info *pinfo, proto_tree *tree, tvbuff_t *t
 
 static int
 dissect_x509af_T_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+#line 85 "x509af.cnf"
   offset=call_ber_oid_callback(algorithm_id, tvb, offset, pinfo, tree);
 
 
+
   return offset;
 }
 static int dissect_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -420,6 +425,7 @@ static const ber_choice_t SubjectName_choice[] = {
 
 static int
 dissect_x509af_SubjectName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+#line 112 "x509af.cnf"
 
     offset = dissect_ber_choice(pinfo, tree, tvb, offset,
                                  SubjectName_choice, hf_index, ett_x509af_SubjectName,
@@ -429,6 +435,7 @@ dissect_x509af_SubjectName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
   proto_item_append_text(proto_item_get_parent(tree), " (%s)", x509if_get_last_dn());
 
 
+
   return offset;
 }
 static int dissect_subject(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -477,7 +484,8 @@ static int dissect_subjectPublicKeyInfo(packet_info *pinfo, proto_tree *tree, tv
 
 static int
 dissect_x509af_T_extnId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-  char *name;
+#line 91 "x509af.cnf"
+  const char *name;
 
     offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509af_extension_id, &extension_id);
 
@@ -489,6 +497,7 @@ dissect_x509af_T_extnId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pa
   }
 
 
+
   return offset;
 }
 static int dissect_extnId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -511,6 +520,7 @@ static int dissect_critical(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
 
 static int
 dissect_x509af_T_extnValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+#line 102 "x509af.cnf"
   gint8 class;
   gboolean pc, ind;
   gint32 tag;
@@ -521,6 +531,7 @@ dissect_x509af_T_extnValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
   offset=call_ber_oid_callback(extension_id, tvb, offset, pinfo, tree);
 
 
+
   return offset;
 }
 static int dissect_extnValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1079,7 +1090,7 @@ static void dissect_DSS_Params_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree
 
 
 /*--- End of included file: packet-x509af-fn.c ---*/
-
+#line 61 "packet-x509af-template.c"
 
 const char *x509af_get_last_algorithm_id(void) {
   return algorithm_id;
@@ -1125,7 +1136,7 @@ void proto_register_x509af(void) {
         "Extension Id", HFILL }},
 
 /*--- Included file: packet-x509af-hfarr.c ---*/
-
+#line 1 "packet-x509af-hfarr.c"
     { &hf_x509af_Certificate_PDU,
       { "Certificate", "x509af.Certificate",
         FT_NONE, BASE_NONE, NULL, 0,
@@ -1204,7 +1215,7 @@ void proto_register_x509af(void) {
         "SubjectName/rdnSequence", HFILL }},
     { &hf_x509af_algorithmId,
       { "algorithmId", "x509af.algorithmId",
-        FT_STRING, BASE_NONE, NULL, 0,
+        FT_OID, BASE_NONE, NULL, 0,
         "AlgorithmIdentifier/algorithmId", HFILL }},
     { &hf_x509af_parameters,
       { "parameters", "x509af.parameters",
@@ -1240,7 +1251,7 @@ void proto_register_x509af(void) {
         "Extensions/_item", HFILL }},
     { &hf_x509af_extnId,
       { "extnId", "x509af.extnId",
-        FT_STRING, BASE_NONE, NULL, 0,
+        FT_OID, BASE_NONE, NULL, 0,
         "Extension/extnId", HFILL }},
     { &hf_x509af_critical,
       { "critical", "x509af.critical",
@@ -1424,7 +1435,7 @@ void proto_register_x509af(void) {
         "DSS-Params/g", HFILL }},
 
 /*--- End of included file: packet-x509af-hfarr.c ---*/
-
+#line 105 "packet-x509af-template.c"
   };
 
   /* List of subtrees */
@@ -1432,7 +1443,7 @@ void proto_register_x509af(void) {
     &ett_pkix_crl,
 
 /*--- Included file: packet-x509af-ettarr.c ---*/
-
+#line 1 "packet-x509af-ettarr.c"
     &ett_x509af_Certificate,
     &ett_x509af_T_signedCertificate,
     &ett_x509af_SubjectName,
@@ -1467,7 +1478,7 @@ void proto_register_x509af(void) {
     &ett_x509af_DSS_Params,
 
 /*--- End of included file: packet-x509af-ettarr.c ---*/
-
+#line 111 "packet-x509af-template.c"
   };
 
   /* Register protocol */
@@ -1489,7 +1500,7 @@ void proto_reg_handoff_x509af(void) {
 
 
 /*--- Included file: packet-x509af-dis-tab.c ---*/
-
+#line 1 "packet-x509af-dis-tab.c"
   register_ber_oid_dissector("2.5.4.36", dissect_Certificate_PDU, proto_x509af, "id-at-userCertificate");
   register_ber_oid_dissector("2.5.4.37", dissect_Certificate_PDU, proto_x509af, "id-at-cAcertificate");
   register_ber_oid_dissector("2.5.4.38", dissect_CertificateList_PDU, proto_x509af, "id-at-authorityRevocationList");
@@ -1501,7 +1512,7 @@ void proto_reg_handoff_x509af(void) {
 
 
 /*--- End of included file: packet-x509af-dis-tab.c ---*/
-
+#line 131 "packet-x509af-template.c"
 
        /*XXX these should really go to a better place but since that
          I have not that ITU standard, ill put it here for the time
index f4d40d14f04bab8a288142f7646cbf17523c9b97..e78f63c7eb01566ca7d73a86817f9126c94dbadf 100644 (file)
@@ -5,6 +5,7 @@
 
 /* Input file: packet-x509af-template.h */
 
+#line 1 "packet-x509af-template.h"
 /* packet-x509af.h
  * Routines for X.509 Authentication Framework packet dissection
  *  Ronnie Sahlberg 2004
@@ -35,7 +36,7 @@
 
 
 /*--- Included file: packet-x509af-exp.h ---*/
-
+#line 1 "packet-x509af-exp.h"
 extern const value_string x509af_Version_vals[];
 extern const value_string x509af_Time_vals[];
 int dissect_x509af_Certificate(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
@@ -62,7 +63,7 @@ int dissect_x509af_AttCertValidityPeriod(gboolean implicit_tag, tvbuff_t *tvb, i
 int dissect_x509af_AttributeCertificateAssertion(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
 
 /*--- End of included file: packet-x509af-exp.h ---*/
-
+#line 30 "packet-x509af-template.h"
 
 extern const char* x509af_get_last_algorithm_id(void);