--- pciutils-2.2.3/lspci.c.orig 2006-07-20 10:27:34.000000000 +0900 +++ pciutils-2.2.3/lspci.c.orig 2006-07-20 10:50:14.000000000 +0900 @@ -259,10 +259,10 @@ show_slot_name(d); printf(" %s: %s", - pci_lookup_name(pacc, classbuf, sizeof(classbuf), + pci_lookup_name(pacc, (char *)classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS, get_conf_word(d, PCI_CLASS_DEVICE)), - pci_lookup_name(pacc, devbuf, sizeof(devbuf), + pci_lookup_name(pacc, (char *)devbuf, sizeof(devbuf), PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE, p->vendor_id, p->device_id)); if (c = get_conf_byte(d, PCI_REVISION_ID)) @@ -271,7 +271,7 @@ { char *x; c = get_conf_byte(d, PCI_CLASS_PROG); - x = pci_lookup_name(pacc, devbuf, sizeof(devbuf), + x = pci_lookup_name(pacc, (char *)devbuf, sizeof(devbuf), PCI_LOOKUP_PROGIF | PCI_LOOKUP_NO_NUMBERS, get_conf_word(d, PCI_CLASS_DEVICE), c); if (c || x) @@ -533,7 +533,16 @@ static void show_pcix_bridge(struct device *d, int where) { - static const byte * const sec_clock_freq[8] = { "conv", "66MHz", "100MHz", "133MHz", "?4", "?5", "?6", "?7" }; + static const byte * const sec_clock_freq[8] = { + (unsigned char *)"conv", + (unsigned char *)"66MHz", + (unsigned char *)"100MHz", + (unsigned char *)"133MHz", + (unsigned char *)"?4", + (unsigned char *)"?5", + (unsigned char *)"?6", + (unsigned char *)"?7" + }; u16 secstatus; u32 status, upstcr, downstcr; @@ -2002,7 +2011,7 @@ { *p++ = '\n'; *p = 0; - fputs(line, stdout); + fputs((char *)line, stdout); for(p=line; *p; p++) if (*p == '+' || *p == '|') *p = '|'; @@ -2019,19 +2028,19 @@ struct bridge *b; char namebuf[256]; - p += sprintf(p, "%02x.%x", q->dev, q->func); + p += sprintf((char *)p, "%02x.%x", q->dev, q->func); for(b=&host_bridge; b; b=b->chain) if (b->br_dev == d) { if (b->secondary == b->subordinate) - p += sprintf(p, "-[%04x:%02x]-", b->domain, b->secondary); + p += sprintf((char *)p, "-[%04x:%02x]-", b->domain, b->secondary); else - p += sprintf(p, "-[%04x:%02x-%02x]-", b->domain, b->secondary, b->subordinate); + p += sprintf((char *)p, "-[%04x:%02x-%02x]-", b->domain, b->secondary, b->subordinate); show_tree_bridge(b, line, p); return; } if (verbose) - p += sprintf(p, " %s", + p += sprintf((char *)p, " %s", pci_lookup_name(pacc, namebuf, sizeof(namebuf), PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE, q->vendor_id, q->device_id)); @@ -2072,7 +2081,7 @@ if (!b->first_bus->sibling) { if (b == &host_bridge) - p += sprintf(p, "[%04x:%02x]-", b->domain, b->first_bus->number); + p += sprintf((char *)p, "[%04x:%02x]-", b->domain, b->first_bus->number); show_tree_bus(b->first_bus, line, p); } else @@ -2082,11 +2091,11 @@ while (u->sibling) { - k = p + sprintf(p, "+-[%04x:%02x]-", u->domain, u->number); + k = p + sprintf((char *)p, "+-[%04x:%02x]-", u->domain, u->number); show_tree_bus(u, line, k); u = u->sibling; } - k = p + sprintf(p, "\\-[%04x:%02x]-", u->domain, u->number); + k = p + sprintf((char *)p, "\\-[%04x:%02x]-", u->domain, u->number); show_tree_bus(u, line, k); } } @@ -2094,7 +2103,7 @@ static void show_forest(void) { - char line[256]; + unsigned char line[256]; grow_tree(); show_tree_bridge(&host_bridge, line, line); --- pciutils-2.2.3/lib/names.c.orig 2006-05-05 21:18:32.000000000 +0900 +++ pciutils-2.2.3/lib/names.c.orig 2006-07-20 10:41:26.000000000 +0900 @@ -99,7 +99,7 @@ u32 id34 = id_pair(id3, id4); unsigned int h = id_hash(cat, id12, id34); struct id_entry *n = a->id_hash[h]; - int len = strlen(text); + int len = strlen((char *)text); while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat)) n = n->next; @@ -149,7 +149,7 @@ static const char parse_error[] = "Parse error"; *lino = 0; - while (fgets(line, sizeof(line), f)) + while (fgets((char *)line, sizeof(line), f)) { (*lino)++; p = line; --- pciutils-2.2.3/lib/names.c.orig 2006-05-05 21:18:32.000000000 +0900 +++ pciutils-2.2.3/lib/names.c.orig 2006-07-20 10:41:26.000000000 +0900 @@ -355,7 +355,7 @@ if (num) res = snprintf(buf, size, "%04x", iv); else if (v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0)) - return v->name; + return (char *)v->name; else res = snprintf(buf, size, "Unknown vendor %04x", iv); break; @@ -365,7 +365,7 @@ if (num) res = snprintf(buf, size, "%04x", id); else if (d = id_lookup(a, ID_DEVICE, iv, id, 0, 0)) - return d->name; + return (char *)d->name; else if (synth) res = snprintf(buf, size, "Unknown device %04x", id); else @@ -395,7 +395,7 @@ if (num) res = snprintf(buf, size, "%04x", isv); else if (v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0)) - return v->name; + return (char *)v->name; else if (synth) res = snprintf(buf, size, "Unknown vendor %04x", isv); else @@ -409,7 +409,7 @@ if (num) res = snprintf(buf, size, "%04x", isd); else if (d = id_lookup_subsys(a, iv, id, isv, isd)) - return d->name; + return (char *)d->name; else if (synth) res = snprintf(buf, size, "Unknown device %04x", isd); else @@ -441,7 +441,7 @@ if (num) res = snprintf(buf, size, "%04x", icls); else if (cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0)) - return cls->name; + return (char *)cls->name; else if (cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0)) res = snprintf(buf, size, "%s [%04x]", cls->name, icls); else if (synth) @@ -455,7 +455,7 @@ if (num) res = snprintf(buf, size, "%02x", ipif); else if (pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0)) - return pif->name; + return (char *)pif->name; else if (icls == 0x0101 && !(ipif & 0x70)) { /* IDE controllers have complex prog-if semantics */ --- pciutils-2.2.3/pcimodules.c.orig 2006-07-20 10:57:50.000000000 +0900 +++ pciutils-2.2.3/pcimodules.c.orig 2006-07-20 11:01:41.000000000 +0900 @@ -56,7 +56,7 @@ static unsigned long desired_class; static unsigned long desired_classmask; /* Default is 0: accept all classes.*/ -void +static void read_pcimap(void) { struct utsname utsname;