Common subdirectories: a/src/OVAL/api and b/src/OVAL/api diff -u a/src/OVAL/oval_affected.c b/src/OVAL/oval_affected.c --- a/src/OVAL/oval_affected.c 2009-07-27 10:47:19 -0400 +++ b/src/OVAL/oval_affected.c 2009-07-27 13:48:03 -0400 @@ -163,7 +163,6 @@ struct oval_affected *affected = (struct oval_affected *)user; int return_code; xmlChar *tagname = xmlTextReaderName(reader); - xmlChar *namespace = xmlTextReaderNamespaceUri(reader); if (strcmp(tagname, "platform") == 0) { char *platform = NULL; return_code = @@ -193,8 +192,6 @@ oval_affected_consumer consumer, void *user) { struct oval_affected *affected = oval_affected_new(); - xmlChar *tagname = xmlTextReaderName(reader); - xmlChar *namespace = xmlTextReaderNamespaceUri(reader); char *family = xmlTextReaderGetAttribute(reader, "family"); set_oval_affected_family(affected, _odafamily(family)); free(family); @@ -220,13 +217,13 @@ struct oval_iterator *platforms = oval_collection_iterator(affected->platforms); for (index = 1; oval_collection_iterator_has_more(platforms); index++) { - void *platform = oval_collection_iterator_next(platforms); + char *platform = (char*)oval_collection_iterator_next(platforms); printf("%sPLATFORM[%d] = %s\n", nxtindent, index, platform); } struct oval_iterator *products = oval_collection_iterator(affected->products); for (index = 1; oval_collection_iterator_has_more(products); index++) { - void *product = oval_collection_iterator_next(products); + char *product = (char*)oval_collection_iterator_next(products); printf("%sPRODUCT[%d] = %s\n", nxtindent, index, product); } } diff -u a/src/OVAL/oval_agent.c b/src/OVAL/oval_agent.c --- a/src/OVAL/oval_agent.c 2009-07-20 17:11:03 -0400 +++ b/src/OVAL/oval_agent.c 2009-07-27 13:19:41 -0400 @@ -27,6 +27,7 @@ * "David Niemoller" */ +#include #include "oval_definitions_impl.h" #include "oval_agent_api_impl.h" #include "oval_parser_impl.h" diff -u a/src/OVAL/oval_collection.c b/src/OVAL/oval_collection.c --- a/src/OVAL/oval_collection.c 2009-04-13 13:14:38 -0400 +++ b/src/OVAL/oval_collection.c 2009-07-27 13:44:18 -0400 @@ -169,7 +169,7 @@ //TEST FREEFUNC void oval_collection_main_freefunc(void *item) { - printf("FREEFUNC: item = %s\n", item); + printf("FREEFUNC: item = %s\n", (char*)item); } //TEST MAIN @@ -192,8 +192,10 @@ oval_collection_iterator(collection); while (oval_collection_iterator_has_more(iterator)) printf("[%d] string = %s\n", i, - oval_collection_iterator_next(iterator)); + (char*)oval_collection_iterator_next(iterator)); } oval_collection_free_items(collection, &oval_collection_main_freefunc); + + return 1; } diff -u a/src/OVAL/oval_component.c b/src/OVAL/oval_component.c --- a/src/OVAL/oval_component.c 2009-07-27 10:48:11 -0400 +++ b/src/OVAL/oval_component.c 2009-07-27 13:25:45 -0400 @@ -435,6 +435,18 @@ free(split->delimiter); }; break; + case OVAL_COMPONENT_OBJECTREF: + case OVAL_COMPONENT_LITERAL: + case OVAL_COMPONENT_FUNCTION: + case OVAL_COMPONENT_VARREF: + case OVAL_COMPONENT_UNKNOWN: + case OVAL_FUNCTION_ARITHMETIC: + case OVAL_FUNCTION_CONCAT: + case OVAL_FUNCTION_ESCAPE_REGEX: + case OVAL_FUNCTION_REGEX_CAPTURE: + case OVAL_FUNCTION_SUBSTRING: + case OVAL_FUNCTION_TIMEDIF: + {/*NOOP*/} } } } @@ -625,7 +637,6 @@ oval_component_consumer consumer, void *user) { char *tagname = xmlTextReaderName(reader); - oval_component_type_enum type; int return_code; struct oval_component *component;; if (strcmp(tagname, "literal_component") == 0) { @@ -718,11 +729,12 @@ else snprintf(nxtindent, sizeof(nxtindent), "%sCOMPONENT[%d].", indent, index); - printf("%sTYPE(%d) = %d\n", nxtindent, component, - oval_component_type(component)); + printf("%sTYPE(%d) = %d\n", nxtindent, (int)component, + (int)oval_component_type(component)); if (oval_component_type(component) > OVAL_COMPONENT_FUNCTION) { - oval_component_FUNCTION_t *function = - (oval_component_FUNCTION_t *) component; + //oval_component_FUNCTION_t *function = + //(oval_component_FUNCTION_t *) component; + //TODO } void function_to_print() { struct oval_iterator_component *subcomps = @@ -815,7 +827,9 @@ case OVAL_FUNCTION_ESCAPE_REGEX: case OVAL_FUNCTION_CONCAT:{ function_to_print(); - } - break; + }break; + case OVAL_COMPONENT_FUNCTION: + case OVAL_COMPONENT_UNKNOWN: + {/*NOOP*/} } } diff -u a/src/OVAL/oval_criteriaNode.c b/src/OVAL/oval_criteriaNode.c --- a/src/OVAL/oval_criteriaNode.c 2009-07-27 10:48:27 -0400 +++ b/src/OVAL/oval_criteriaNode.c 2009-07-27 13:39:08 -0400 @@ -151,7 +151,8 @@ malloc(sizeof(oval_criteria_node_EXTENDDEF_t)); ((struct oval_criteria_node_EXTENDDEF *)node)-> definition = NULL; - } + }break; + case NODETYPE_UNKNOWN:{/*NOOP*/} } node->type = type; node->negate = 0; @@ -180,7 +181,8 @@ break; case NODETYPE_EXTENDDEF:{ //NOOP - } + }break; + case NODETYPE_UNKNOWN:{/*NOOP*/} } if (node->comment != NULL) free(node->comment); @@ -319,7 +321,8 @@ definition_ref); set_oval_criteria_node_definition(node, definition); - } + }break; + case NODETYPE_UNKNOWN:{/*NOOP*/} } //oval_parser_parse_tag(reader, context,&_oval_criteria_parse_tag,node); (*consumer) (node, user); @@ -401,7 +404,7 @@ nxtindent, 0); else printf("%sDEFINITION = <>\n", nxtindent); - } - break; + }break; + case NODETYPE_UNKNOWN:{/*NOOP*/} } } diff -u a/src/OVAL/oval_definitions_impl.h b/src/OVAL/oval_definitions_impl.h --- a/src/OVAL/oval_definitions_impl.h 2009-07-17 18:00:24 -0400 +++ b/src/OVAL/oval_definitions_impl.h 2009-07-27 13:29:47 -0400 @@ -70,6 +70,7 @@ oval_affected_family_enum); void add_oval_affected_platform(struct oval_affected *, char *); void add_oval_affected_product(struct oval_affected *, char *); +void oval_affected_to_print(struct oval_affected *, char *, int); typedef void (*oval_affected_consumer) (struct oval_affected *, void *); int oval_affected_parse_tag(xmlTextReaderPtr reader, @@ -92,6 +93,7 @@ void add_oval_test_notes(struct oval_test *, char *); int oval_test_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context); +void oval_test_to_print(struct oval_test *, char *, int); struct oval_criteria_node *oval_criteria_node_new(oval_criteria_node_type_enum); void oval_criteria_node_free(struct oval_criteria_node *); @@ -104,6 +106,7 @@ void add_oval_criteria_node_subnodes(struct oval_criteria_node *, struct oval_criteria_node *); //type==NODETYPE_CRITERIA void set_oval_criteria_node_test(struct oval_criteria_node *, struct oval_test *); //type==NODETYPE_CRITERION void set_oval_criteria_node_definition(struct oval_criteria_node *, struct oval_definition *); //type==NODETYPE_EXTENDDEF +void oval_criteria_node_to_print(struct oval_criteria_node *, char *, int); typedef void (*oval_criteria_consumer) (struct oval_criteria_node *, void *); int oval_criteria_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, @@ -119,6 +122,7 @@ typedef void (*oval_reference_consumer) (struct oval_reference *, void *); int oval_reference_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_reference_consumer, void *); +void oval_reference_to_print(struct oval_reference *, char *, int); struct oval_definition *oval_definition_new(); void oval_definition_free(struct oval_definition *); @@ -138,6 +142,7 @@ struct oval_reference *); int oval_definition_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context); +void oval_definition_to_print(struct oval_definition *, char *, int); struct oval_object *oval_object_new(); void oval_object_free(struct oval_object *); @@ -169,6 +174,7 @@ void set_oval_state_version(struct oval_state *, int); int oval_state_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context); +void oval_state_to_print(struct oval_state *, char *, int); struct oval_variable *oval_variable_new(); void oval_variable_free(struct oval_variable *); @@ -180,6 +186,7 @@ void set_oval_variable_component(struct oval_variable *, struct oval_component *); //type==OVAL_VARIABLE_LOCAL int oval_variable_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context); +void oval_variable_to_print(struct oval_variable *, char *, int); struct oval_variable_binding *oval_variable_binding_new(); void oval_variable_binding_free(struct oval_variable_binding *); @@ -201,6 +208,8 @@ int oval_object_content_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_object_content_consumer, void *); +void oval_object_to_print(struct oval_object *, char *, int); +void oval_object_content_to_print(struct oval_object_content *, char *, int); struct oval_behavior *oval_behavior_new(); void oval_behavior_free(struct oval_behavior *); @@ -211,6 +220,7 @@ typedef void (*oval_behavior_consumer) (struct oval_behavior *, void *); int oval_behavior_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_family_enum, oval_behavior_consumer, void *); +void oval_behavior_to_print(struct oval_behavior *, char *, int); struct oval_entity *oval_entity_new(); void oval_entity_free(struct oval_entity *); @@ -223,6 +233,7 @@ oval_entity_varref_type_enum); void set_oval_entity_variable(struct oval_entity *, struct oval_variable *); void set_oval_entity_value(struct oval_entity *, struct oval_value *); +void oval_entity_to_print(struct oval_entity *, char *, int); typedef void (*oval_entity_consumer) (struct oval_entity *, void *); int oval_entity_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, @@ -239,6 +250,8 @@ typedef void (*oval_set_consumer) (struct oval_set *, void *); int oval_set_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_set_consumer, void *); +void oval_set_to_print(struct oval_set *, char *, int); + struct oval_value *oval_value_new(); void oval_value_free(struct oval_value *); @@ -249,6 +262,7 @@ void set_oval_value_boolean(struct oval_value *, int); //datatype==OVAL_DATATYPE_BOOLEAN void set_oval_value_float(struct oval_value *, float); //datatype==OVAL_DATATYPE_FLOAT void set_oval_value_integer(struct oval_value *, long); //datatype==OVAL_DATATYPE_INTEGER +void oval_value_to_print(struct oval_value *, char *, int); typedef void (*oval_value_consumer) (struct oval_value *, void *); int oval_value_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, @@ -266,6 +280,7 @@ typedef void (*oval_component_consumer) (struct oval_component *, void *); int oval_component_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_component_consumer, void *); +void oval_component_to_print(struct oval_component *, char *, int); struct oval_message *oval_message_new(); diff -u a/src/OVAL/oval_entity.c b/src/OVAL/oval_entity.c --- a/src/OVAL/oval_entity.c 2009-07-27 10:48:56 -0400 +++ b/src/OVAL/oval_entity.c 2009-07-27 15:41:00 -0400 @@ -177,7 +177,7 @@ } void oval_entity_consume_value(struct oval_value *use_value, void *value) { - char **p = (char **) value; + struct oval_value **p = (struct oval_value **) value; (*p) = use_value; } diff -u a/src/OVAL/oval_message.c b/src/OVAL/oval_message.c --- a/src/OVAL/oval_message.c 2009-07-17 18:00:19 -0400 +++ b/src/OVAL/oval_message.c 2009-07-27 13:11:38 -0400 @@ -29,6 +29,7 @@ #include #include +#include #include "oval_agent_api_impl.h" #include "oval_system_characteristics_impl.h" #include "oval_collection_impl.h" diff -u a/src/OVAL/oval_objectContent.c b/src/OVAL/oval_objectContent.c --- a/src/OVAL/oval_objectContent.c 2009-07-27 10:49:24 -0400 +++ b/src/OVAL/oval_objectContent.c 2009-07-27 15:40:56 -0400 @@ -136,6 +136,7 @@ content = (oval_object_content_t *) set; } break; + case OVAL_OBJECTCONTENT_UNKNOWN:{/*NOOP*/} } content->fieldName = NULL; content->type = type; @@ -159,6 +160,7 @@ oval_set_free(set->set); } break; + case OVAL_OBJECTCONTENT_UNKNOWN:{/*NOOP*/} } free(content); } @@ -170,7 +172,7 @@ void set_oval_object_content_set(struct oval_object_content *, struct oval_set *); //TODO //type == OVAL_OBJECTCONTENT_SET void oval_object_content_consume_entity(struct oval_entity *entity, - void *user) + void *user) { struct oval_object_content_ENTITY *content_entity = (struct oval_object_content_ENTITY *) user; @@ -205,7 +207,7 @@ return_code = oval_entity_parse_tag(reader, context, - &oval_object_content_consume_entity, + &oval_object_content_consume_entity, content); content_entity->varCheck = oval_check_parse(reader, "var_check", @@ -213,14 +215,15 @@ }; break; case OVAL_OBJECTCONTENT_SET:{ - struct oval_object_content_SET *content_set = - (struct oval_object_content_SET *)content; + //struct oval_object_content_SET *content_set = + // (struct oval_object_content_SET *)content; return_code = - oval_set_parse_tag(reader, context, + oval_set_parse_tag(reader, context, &oval_object_content_consume_set, content); }; break; + case OVAL_OBJECTCONTENT_UNKNOWN:{/*NOOP*/} } (*consumer) (content, user); if (return_code != 1) { @@ -266,5 +269,6 @@ struct oval_set *set = oval_object_content_set(content); oval_set_to_print(set, nxtindent, 0); } break; + case OVAL_OBJECTCONTENT_UNKNOWN:{/*NOOP*/} } } diff -u a/src/OVAL/oval_parser.c b/src/OVAL/oval_parser.c --- a/src/OVAL/oval_parser.c 2009-07-21 06:46:03 -0400 +++ b/src/OVAL/oval_parser.c 2009-07-27 13:48:50 -0400 @@ -105,7 +105,6 @@ int return_code; char *tagname = xmlTextReaderLocalName(reader); while ((return_code = xmlTextReaderRead(reader)) == 1) { - char *subname = xmlTextReaderLocalName(reader); switch (xmlTextReaderNodeType(reader)) { case XML_READER_TYPE_ELEMENT:{ return_code = (*tag_func) (reader, context); @@ -211,9 +210,6 @@ void *user_arg) { xmlTextReaderPtr reader; xmlDocPtr doc; - xmlNodePtr cur; - xmlNode *node; - int ret; doc = xmlParseFile(docname); reader = xmlNewTextReaderFilename(docname); if (reader != NULL) { diff -u a/src/OVAL/oval_parser_impl.h b/src/OVAL/oval_parser_impl.h --- a/src/OVAL/oval_parser_impl.h 2009-07-20 11:09:52 -0400 +++ b/src/OVAL/oval_parser_impl.h 2009-07-27 13:21:11 -0400 @@ -82,4 +82,7 @@ int oval_parser_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_xml_tag_parser, void *); +int oval_parser_log + (struct oval_parser_context *, oval_xml_severity_enum , char *); + #endif /* OVAL_PARSER_H_ */ diff -u a/src/OVAL/oval_resultCriteriaNode.c b/src/OVAL/oval_resultCriteriaNode.c --- a/src/OVAL/oval_resultCriteriaNode.c 2009-04-13 13:14:38 -0400 +++ b/src/OVAL/oval_resultCriteriaNode.c 2009-07-27 13:40:08 -0400 @@ -121,6 +121,7 @@ test = ((struct oval_result_criteria_node_CRITERION *)node)->test; } + return test; } struct oval_result *oval_result_criteria_node_extends(struct diff -u a/src/OVAL/oval_set.c b/src/OVAL/oval_set.c --- a/src/OVAL/oval_set.c 2009-07-27 10:49:35 -0400 +++ b/src/OVAL/oval_set.c 2009-07-27 13:47:40 -0400 @@ -133,6 +133,7 @@ oval_collection_free_items(collective->objects, &free_object); } break; + case OVAL_SET_UNKNOWN:{/*NOOP*/} } free(set); } @@ -158,6 +159,7 @@ collective->objects = oval_collection_new(); } break; + case OVAL_SET_UNKNOWN:{/*NOOP*/} } } @@ -344,5 +346,6 @@ oval_state_to_print(state, nxtindent, i); } } break; + case OVAL_SET_UNKNOWN:{/*NOOP*/} } } diff -u a/src/OVAL/oval_state.c b/src/OVAL/oval_state.c --- a/src/OVAL/oval_state.c 2009-07-27 10:49:45 -0400 +++ b/src/OVAL/oval_state.c 2009-07-27 15:40:57 -0400 @@ -1,5 +1,5 @@ /** - * @file oval_state.c + * @file oval_state.c * \brief Open Vulnerability and Assessment Language * * See more details at http://oval.mitre.org/ @@ -176,13 +176,13 @@ state->version = version; } -void _oval_state_note_consumer(char *text, void *user) +void _oval_state_note_consumer(char *text, void *user) { struct oval_state *state = (struct oval_state *)user; add_oval_state_notes(state, text); } -void _oval_state_entity_consumer(struct oval_entity *entity, void *user) +void _oval_state_entity_consumer(struct oval_entity *entity, void *user) { struct oval_state *state = (struct oval_state *) user; oval_collection_add(state->entities, (void *)entity); @@ -191,7 +191,7 @@ int _oval_state_parse_notes(xmlTextReaderPtr reader, struct oval_parser_context *context, void *user) { - return oval_parser_text_value(reader, context, + return oval_parser_text_value(reader, context, &_oval_state_note_consumer, user); } @@ -204,11 +204,10 @@ int return_code = 1; if ((strcmp(tagname, "notes") == 0)) { return_code = - oval_parser_parse_tag(reader, context, - &_oval_state_note_consumer, user); + _oval_state_parse_notes(reader, context, user); } else { return_code = - oval_entity_parse_tag(reader, context, + oval_entity_parse_tag(reader, context, &_oval_state_entity_consumer, user); } if (return_code != 1) { diff -u a/src/OVAL/oval_stringMap.c b/src/OVAL/oval_stringMap.c --- a/src/OVAL/oval_stringMap.c 2009-07-16 15:28:46 -0400 +++ b/src/OVAL/oval_stringMap.c 2009-07-27 13:47:27 -0400 @@ -166,7 +166,7 @@ //TEST FREEFUNC void oval_string_map_main_freefunc(void *item) { - printf("FREEFUNC: item = %s\n", item); + printf("FREEFUNC: item = %s\n", (char*)item); } //TEST MAIN @@ -190,8 +190,9 @@ for (index = 0; keys[index] != NULL; index++) { char *key = keys[index]; printf("TEST::getting key %s -> %s\n", key, - oval_string_map_get_value(map, key)); + (char*)oval_string_map_get_value(map, key)); } oval_string_map_free(map, &oval_string_map_main_freefunc); + return 1; } diff -u a/src/OVAL/oval_sysData.c b/src/OVAL/oval_sysData.c --- a/src/OVAL/oval_sysData.c 2009-07-20 12:01:00 -0400 +++ b/src/OVAL/oval_sysData.c 2009-07-27 13:17:54 -0400 @@ -29,6 +29,7 @@ #include #include +#include #include "oval_agent_api_impl.h" #include "oval_system_characteristics_impl.h" #include "oval_collection_impl.h" diff -u a/src/OVAL/oval_sysInfo.c b/src/OVAL/oval_sysInfo.c --- a/src/OVAL/oval_sysInfo.c 2009-07-20 10:44:22 -0400 +++ b/src/OVAL/oval_sysInfo.c 2009-07-27 13:12:31 -0400 @@ -29,6 +29,7 @@ #include #include +#include #include "oval_system_characteristics_impl.h" #include "oval_collection_impl.h" diff -u a/src/OVAL/oval_sysInterface.c b/src/OVAL/oval_sysInterface.c --- a/src/OVAL/oval_sysInterface.c 2009-07-20 09:34:15 -0400 +++ b/src/OVAL/oval_sysInterface.c 2009-07-27 13:48:27 -0400 @@ -29,6 +29,7 @@ #include #include +#include #include "oval_system_characteristics_impl.h" #include "oval_collection_impl.h" diff -u a/src/OVAL/oval_sysItem.c b/src/OVAL/oval_sysItem.c --- a/src/OVAL/oval_sysItem.c 2009-07-20 09:43:10 -0400 +++ b/src/OVAL/oval_sysItem.c 2009-07-27 13:47:54 -0400 @@ -28,6 +28,7 @@ */ #include +#include #include #include "oval_agent_api_impl.h" #include "oval_system_characteristics_impl.h" @@ -90,7 +91,7 @@ { sysitem->datatype = datatype; } -int set_oval_sysitem_mask(struct oval_sysitem *sysitem, int mask) +void set_oval_sysitem_mask(struct oval_sysitem *sysitem, int mask) { sysitem->mask = mask; } diff -u a/src/OVAL/oval_syschar.c b/src/OVAL/oval_syschar.c --- a/src/OVAL/oval_syschar.c 2009-07-20 17:03:00 -0400 +++ b/src/OVAL/oval_syschar.c 2009-07-27 13:04:39 -0400 @@ -30,6 +30,7 @@ #include #include +#include #include "oval_system_characteristics_impl.h" #include "oval_collection_impl.h" #include "oval_agent_api_impl.h" @@ -241,8 +242,6 @@ oval_parser_log_warn(context, message); } - struct oval_object_model *model = context->model; - return return_code; } diff -u a/src/OVAL/oval_system_characteristics_impl.h b/src/OVAL/oval_system_characteristics_impl.h --- a/src/OVAL/oval_system_characteristics_impl.h 2009-07-17 16:18:18 -0400 +++ b/src/OVAL/oval_system_characteristics_impl.h 2009-07-27 13:16:09 -0400 @@ -44,6 +44,8 @@ int oval_sysint_parse_tag (xmlTextReaderPtr, struct oval_parser_context*, oval_sysint_consumer, void*); +void oval_sysint_to_print(struct oval_sysint *, char *, int); + struct oval_sysinfo *oval_sysinfo_new(); void oval_sysinfo_free(struct oval_sysinfo *); @@ -53,11 +55,17 @@ void set_oval_sysinfo_os_architecture(struct oval_sysinfo *, char *); void set_oval_sysinfo_primary_host_name(struct oval_sysinfo *, char *); void add_oval_sysinfo_interface(struct oval_sysinfo *, struct oval_sysint *); +void oval_sysinfo_to_print(struct oval_sysinfo *, char *, int); +int oval_sysinfo_parse_tag(xmlTextReaderPtr, struct oval_parser_context *); + struct oval_sysdata *oval_sysdata_new(char *id); void oval_sysdata_free(struct oval_sysdata *); void set_oval_sysdata_status(struct oval_sysdata *, oval_syschar_status_enum); +int oval_sysdata_parse_tag(xmlTextReaderPtr, struct oval_parser_context *); +void oval_sysdata_to_print(struct oval_sysdata *, char *, int); + struct oval_syschar *oval_syschar_new(struct oval_object *); void oval_syschar_free(struct oval_syschar *); @@ -70,6 +78,7 @@ void add_oval_syschar_variable_binding(struct oval_syschar *, struct oval_variable_binding *); void add_oval_syschar_sysdata(struct oval_syschar *, struct oval_sysdata *); +int oval_syschar_parse_tag(xmlTextReaderPtr, struct oval_parser_context *); void oval_syschar_to_print(struct oval_syschar *, char *, int); //typedef void (*oval_affected_consumer) (struct oval_affected *, void *); @@ -77,9 +86,18 @@ // struct oval_parser_context *context, // oval_affected_consumer, void *); +void oval_sysitem_free(struct oval_sysitem *); + typedef void (*oval_sysitem_consumer)(struct oval_sysitem *, void* client); int oval_sysitem_parse_tag( xmlTextReaderPtr, struct oval_parser_context *, oval_sysitem_consumer, void*); +void oval_sysitem_to_print(struct oval_sysitem *, char *, int); + + +oval_syschar_status_enum oval_syschar_status_parse(xmlTextReaderPtr, char *, + oval_syschar_status_enum); +oval_syschar_collection_flag_enum oval_syschar_flag_parse(xmlTextReaderPtr, char *, + oval_syschar_collection_flag_enum); #endif diff -u a/src/OVAL/oval_test.c b/src/OVAL/oval_test.c --- a/src/OVAL/oval_test.c 2009-07-27 10:49:54 -0400 +++ b/src/OVAL/oval_test.c 2009-07-27 13:48:40 -0400 @@ -228,7 +228,6 @@ { struct oval_test *test = (struct oval_test *)user; xmlChar *tagname = xmlTextReaderName(reader); - xmlChar *namespace = xmlTextReaderNamespaceUri(reader); int return_code = 1; if ((strcmp(tagname, "notes") == 0)) { return_code = diff -u a/src/OVAL/oval_variable.c b/src/OVAL/oval_variable.c --- a/src/OVAL/oval_variable.c 2009-07-27 10:50:18 -0400 +++ b/src/OVAL/oval_variable.c 2009-07-27 13:32:31 -0400 @@ -155,6 +155,9 @@ variable->extension, &free_value); } break; + case OVAL_VARIABLE_EXTERNAL: + case OVAL_VARIABLE_UNKNOWN: + {/*NOOP*/} } } free(variable); @@ -179,6 +182,9 @@ component = NULL; } break; + case OVAL_VARIABLE_EXTERNAL: + case OVAL_VARIABLE_UNKNOWN: + {/*NOOP*/} } } @@ -406,5 +412,7 @@ 0); } break; + case OVAL_VARIABLE_UNKNOWN: + {/*NOOP*/} } } diff -u a/src/OVAL/ovalsys_parser.c b/src/OVAL/ovalsys_parser.c --- a/src/OVAL/ovalsys_parser.c 2009-07-20 10:19:13 -0400 +++ b/src/OVAL/ovalsys_parser.c 2009-07-27 13:09:50 -0400 @@ -33,6 +33,7 @@ #include "api/oval_agent_api.h" #include "oval_parser_impl.h" #include "oval_definitions_impl.h" +#include "oval_system_characteristics_impl.h" const char* NAMESPACE_OVALSYS = "http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"; @@ -115,9 +116,6 @@ void *user_arg) { xmlTextReaderPtr reader; xmlDocPtr doc; - xmlNodePtr cur; - xmlNode *node; - int ret; doc = xmlParseFile(docname); reader = xmlNewTextReaderFilename(docname); if (reader != NULL) { @@ -129,7 +127,7 @@ context.syschar_sysinfo = NULL; context.user_data = user_arg; xmlTextReaderSetErrorHandler(reader, &libxml_error_handler, &context); - int return_code = xmlTextReaderRead(reader); + xmlTextReaderRead(reader); xmlChar *tagname = xmlTextReaderName(reader); xmlChar *namespace = xmlTextReaderNamespaceUri(reader); int is_ovalsys = strcmp(NAMESPACE_OVALSYS, namespace)==0; diff -u a/src/OVAL/test_driver.c b/src/OVAL/test_driver.c --- a/src/OVAL/test_driver.c 2009-07-20 17:17:04 -0400 +++ b/src/OVAL/test_driver.c 2009-07-27 13:22:16 -0400 @@ -7,6 +7,7 @@ #include #include "api/oval_agent_api.h" +#include "oval_system_characteristics_impl.h" @@ -28,6 +29,7 @@ } } printf("test_error_handler:%s: %s\n %s(%d)\n",label,error->message, error->system_id, error->line_number); + return 1; } @@ -54,5 +56,6 @@ printf("THERE ARE %d SYSCHARS\n",numSyschars); } }else printf("USAGE:Test []"); + return 0; }