Index: uspace/srv/pci/libpci/generic.c
===================================================================
--- uspace/srv/pci/libpci/generic.c	(revision a405563b24f1a7675853129014154bb04b6758d5)
+++ uspace/srv/pci/libpci/generic.c	(revision 5b3cf90fc58406e0a1987ff4a0c1e5e21a8b774b)
@@ -30,5 +30,5 @@
 		t->dev = dev;
 		multi = 0;
-		for (t->func = 0; !t->func || multi && t->func < 8;
+		for (t->func = 0; !t->func || (multi && t->func < 8);
 		     t->func++) {
 			u32 vd = pci_read_long(t, PCI_VENDOR_ID);
Index: uspace/srv/pci/libpci/i386-ports.c
===================================================================
--- uspace/srv/pci/libpci/i386-ports.c	(revision a405563b24f1a7675853129014154bb04b6758d5)
+++ uspace/srv/pci/libpci/i386-ports.c	(revision 5b3cf90fc58406e0a1987ff4a0c1e5e21a8b774b)
@@ -80,12 +80,12 @@
 	for (d.dev = 0; d.dev < 32; d.dev++) {
 		u16 class, vendor;
-		if (m->read(&d, PCI_CLASS_DEVICE, (byte *) & class,
+		if ((m->read(&d, PCI_CLASS_DEVICE, (byte *) & class,
 			 sizeof(class))
 		    && (class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST)
-			|| class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA))
-		    || m->read(&d, PCI_VENDOR_ID, (byte *) & vendor,
+			|| class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)))
+		    || (m->read(&d, PCI_VENDOR_ID, (byte *) & vendor,
 			       sizeof(vendor))
 		    && (vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL)
-			|| vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ))) {
+			|| vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))) {
 			a->debug("...outside the Asylum at 0/%02x/0",
 				 d.dev);
Index: uspace/srv/pci/libpci/names.c
===================================================================
--- uspace/srv/pci/libpci/names.c	(revision a405563b24f1a7675853129014154bb04b6758d5)
+++ uspace/srv/pci/libpci/names.c	(revision 5b3cf90fc58406e0a1987ff4a0c1e5e21a8b774b)
@@ -151,5 +151,5 @@
 	int nest;
 	static const char parse_error[] = "Parse error";
-	int i;
+	size_t i;
 
 	*lino = 0;
@@ -331,5 +331,5 @@
 		if (num)
 			res = snprintf(buf, size, "%04x", iv);
-		else if (v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0))
+		else if ((v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0)) != 0)
 			return (char *) v->name;
 		else
@@ -341,5 +341,5 @@
 		if (num)
 			res = snprintf(buf, size, "%04x", id);
-		else if (d = id_lookup(a, ID_DEVICE, iv, id, 0, 0))
+		else if ((d = id_lookup(a, ID_DEVICE, iv, id, 0, 0)) != 0)
 			return (char *) d->name;
 		else if (synth)
@@ -371,5 +371,5 @@
 		if (num)
 			res = snprintf(buf, size, "%04x", isv);
-		else if (v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0))
+		else if ((v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0)) != 0)
 			return (char *) v->name;
 		else if (synth)
@@ -385,5 +385,5 @@
 		if (num)
 			res = snprintf(buf, size, "%04x", isd);
-		else if (d = id_lookup_subsys(a, iv, id, isv, isd))
+		else if ((d = id_lookup_subsys(a, iv, id, isv, isd)) != 0)
 			return (char *) d->name;
 		else if (synth)
@@ -416,7 +416,7 @@
 		if (num)
 			res = snprintf(buf, size, "%04x", icls);
-		else if (cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0))
+		else if ((cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0)) != 0)
 			return (char *) cls->name;
-		else if (cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0))
+		else if ((cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0)) != 0)
 			res = snprintf(buf, size, "%s [%04x]", cls->name, icls);
 		else if (synth)
@@ -430,5 +430,5 @@
 		if (num)
 			res = snprintf(buf, size, "%02x", ipif);
-		else if (pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0))
+		else if ((pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0)) != 0)
 			return (char *) pif->name;
 		else if (icls == 0x0101 && !(ipif & 0x70)) {
