From 67b622f09f4d4da532a0223b43b586cf716d92ec Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 12 Nov 2013 02:04:40 +0100 Subject: fix field types after commit 76082a819319 fix warnings about numeric comparisons with strings --- perl-install/c/stuff.xs.pl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'perl-install/c') diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index de4800529..7ef772975 100755 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -97,14 +97,14 @@ void log_perror(const char *msg) { HV* common_pciusb_hash_init(struct pciusb_entry *e) { HV *rh = (HV *)sv_2mortal((SV *)newHV()); - hv_store(rh, "vendor", 6, newSVnv(e->vendor), 0); - hv_store(rh, "subvendor", 9, newSVnv(e->subvendor), 0); - hv_store(rh, "id", 2, newSVnv(e->device), 0); - hv_store(rh, "subid", 5, newSVnv(e->subdevice), 0); + hv_store(rh, "vendor", 6, newSViv(e->vendor), 0); + hv_store(rh, "subvendor", 9, newSViv(e->subvendor), 0); + hv_store(rh, "id", 2, newSViv(e->device), 0); + hv_store(rh, "subid", 5, newSViv(e->subdevice), 0); hv_store(rh, "driver", 6, newSVpv(e->module ? e->module : "unknown", 0), 0); hv_store(rh, "description", 11, newSVpv(e->text, 0), 0); - hv_store(rh, "pci_bus", 7, newSVnv(e->pci_bus), 0); - hv_store(rh, "pci_device", 10, newSVnv(e->pci_device), 0); + hv_store(rh, "pci_bus", 7, newSViv(e->pci_bus), 0); + hv_store(rh, "pci_device", 10, newSViv(e->pci_device), 0); return rh; } @@ -281,10 +281,10 @@ pci_probe() for (i = 0; i < entries.nb; i++) { struct pciusb_entry *e = &entries.entries[i]; HV * rh = common_pciusb_hash_init(e); - hv_store(rh, "pci_domain", 10, newSVnv(e->pci_domain), 0); - hv_store(rh, "pci_function", 12, newSVnv(e->pci_function), 0); - hv_store(rh, "pci_revision", 12, newSVnv(e->pci_revision), 0); - hv_store(rh, "is_pciexpress", 13, newSVnv(e->is_pciexpress), 0); + hv_store(rh, "pci_domain", 10, newSViv(e->pci_domain), 0); + hv_store(rh, "pci_function", 12, newSViv(e->pci_function), 0); + hv_store(rh, "pci_revision", 12, newSViv(e->pci_revision), 0); + hv_store(rh, "is_pciexpress", 13, newSViv(e->is_pciexpress), 0); hv_store(rh, "nice_media_type", 15, newSVpv(e->class, 0), 0); hv_store(rh, "media_type", 10, newSVpv(pci_class2text(e->class_id), 0), 0); PUSHs(newRV((SV *)rh)); @@ -304,7 +304,7 @@ usb_probe() struct usb_class_text class_text = usb_class2text(e->class_id); snprintf(buf, sizeof(buf), "%s|%s|%s", class_text.usb_class_text, class_text.usb_sub_text, class_text.usb_prot_text); HV * rh = common_pciusb_hash_init(e); - hv_store(rh, "usb_port", 8, newSVnv(e->usb_port), 0); + hv_store(rh, "usb_port", 8, newSViv(e->usb_port), 0); hv_store(rh, "media_type", 10, newSVpv(buf, 0), 0); PUSHs(newRV((SV *)rh)); } -- cgit v1.2.1