X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=src%2Finstall%2Facquire%2Fcaptivemodid.c;h=bc9c24d1aa16b802b73a0d48379aeb9c646e80af;hb=3fe356e055c9a20c4e0f3275e3fd2435ba4373d6;hp=4e3af28d0b63d752874e5549864310154704a6a5;hpb=1743fea0d8266c70a4c0273205481bed3f3ed443;p=captive.git diff --git a/src/install/acquire/captivemodid.c b/src/install/acquire/captivemodid.c index 4e3af28..bc9c24d 100644 --- a/src/install/acquire/captivemodid.c +++ b/src/install/acquire/captivemodid.c @@ -122,7 +122,7 @@ gpointer valid_length_value_gpointer; g_hash_table_insert(module_valid_length_hash,GINT_TO_POINTER(module->length),NULL); } - if (strcmp(module->type,"cabinet")) { + if (strcmp((const char *)module->type,"cabinet")) { if (module->priority>captivemodid_module_type_best_priority_lookup(module->type)) { module_type_best_priority_hash_init(); g_hash_table_insert(module_type_best_priority_hash, @@ -199,7 +199,7 @@ static xmlChar *captivemodid_load_module_xml_get_attr { xmlChar *r; - if (!(r=xmlTextReaderGetAttribute(xml_reader,attr_name))) { + if (!(r=xmlTextReaderGetAttribute(xml_reader,BAD_CAST attr_name))) { /* FIXME: File line identification? */ g_warning(_("%s: Undefined attributes: %s"),captivemodid_pathname,attr_name); return NULL; @@ -221,7 +221,7 @@ char *ends; if (!(string=captivemodid_load_module_xml_get_attr(captivemodid_pathname,xml_reader,attr_name))) return num_min-1; - r=strtol(string,&ends,0); + r=strtol((const char *)string,&ends,0); xmlFree(string); if (rnum_max) { g_warning(_("%s: Numer of out range %ld..%ld: %ld"),captivemodid_pathname,num_min,num_max,r); @@ -240,11 +240,11 @@ xmlChar *cabinet_used_string; goto fail_free_module; if (!(module->md5 =captivemodid_load_module_xml_get_attr(captivemodid_pathname,xml_reader,"md5"))) goto fail_free_module; - if (strlen(module->md5)!=strspn(module->md5,"0123456789abcdef")) { + if (strlen((const char *)module->md5)!=strspn((const char *)module->md5,"0123456789abcdef")) { g_warning(_("%s: Attribute 'md5' can be only lower-cased hexstring: %s"),captivemodid_pathname,module->md5); goto fail_free_module; } - if (strlen(module->md5)!=32) { + if (strlen((const char *)module->md5)!=32) { g_warning(_("%s: Attribute 'md5' length must be 32: %s"),captivemodid_pathname,module->md5); goto fail_free_module; } @@ -253,7 +253,7 @@ xmlChar *cabinet_used_string; if (0>=(module->length=captivemodid_load_module_xml_get_attr_l( captivemodid_pathname,xml_reader,"length",1,G_MAXINT-1))) goto fail_free_module; - if (!(cabinet_used_string=xmlTextReaderGetAttribute(xml_reader,"cabinet_used"))) + if (!(cabinet_used_string=xmlTextReaderGetAttribute(xml_reader,BAD_CAST "cabinet_used"))) module->cabinet_used=0; else { xmlFree(cabinet_used_string); @@ -281,7 +281,7 @@ static void captivemodid_load_foreach g_return_if_fail(captivemodid_module_best_priority_notify!=NULL); - (*captivemodid_module_best_priority_notify)(type); + (*captivemodid_module_best_priority_notify)((const gchar *)type); } void (*captivemodid_module_best_priority_notify)(const gchar *module_type); @@ -311,9 +311,9 @@ xmlTextReader *xml_reader; const xmlChar *xml_name; xml_name=xmlTextReaderName(xml_reader); - /**/ if (!xmlStrcmp(xml_name,"modid")) { /* root tag */ + /**/ if (!xmlStrcmp(xml_name,BAD_CAST "modid")) { /* root tag */ } - else if (!xmlStrcmp(xml_name,"module")) + else if (!xmlStrcmp(xml_name,BAD_CAST "module")) captivemodid_load_module_xml(captivemodid_pathname,xml_reader); else g_warning(_("%s: Unknown ELEMENT node: %s"),captivemodid_pathname,xml_name); xmlFree((xmlChar *)xml_name);