Revision: 6365
          http://ipcop.svn.sourceforge.net/ipcop/?rev=6365&view=rev
Author:   gespinasse
Date:     2012-02-18 11:48:19 +0000 (Sat, 18 Feb 2012)
Log Message:
-----------
Fix 20 warnings 'format not a string literal and no format arguments'
Visible on my tree as I patched gcc with a defaults-format-security.patch

Modified Paths:
--------------
    ipcop/trunk/src/installer/hardware.c

Modified: ipcop/trunk/src/installer/hardware.c
===================================================================
--- ipcop/trunk/src/installer/hardware.c        2012-02-18 10:25:29 UTC (rev 
6364)
+++ ipcop/trunk/src/installer/hardware.c        2012-02-18 11:48:19 UTC (rev 
6365)
@@ -153,8 +153,8 @@
 
     snprintf(logline, STRING_SIZE, "  HWadd %3d, %s, %s, %s\n", type, 
hardwares[numhardwares].module,
             hardwares[numhardwares].device, 
hardwares[numhardwares].description);
-    fprintf(flog, logline);
-    fprintf(fhwdetect, logline);
+    fprintf(flog, "%s", logline);
+    fprintf(fhwdetect, "%s", logline);
     // increment tallies
     numhardwares++;
     switch (type) {
@@ -299,8 +299,8 @@
             if (drivesize < 32) {
                 /* Discard if too small for installation and too small as 
target drive */
                 snprintf(logline, STRING_SIZE, "   discard sd%c %-30.30s 
(%s)\n", deviceletter, model, strsize);
-                fprintf(flog, logline);
-                fprintf(fhwdetect, logline);
+                fprintf(flog, "%s", logline);
+                fprintf(fhwdetect, "%s", logline);
                 continue;
             }
             else if (drivesize < DISK_MINIMUM) {
@@ -486,8 +486,8 @@
         if (type == none) {
             snprintf(logline, STRING_SIZE, "  Skip %04x %04x:%04x, %s\n",
                     pcidev->device_class, pcidev->vendor_id, 
pcidev->device_id, description);
-            fprintf(flog, logline);
-            fprintf(fhwdetect, logline);
+            fprintf(flog, "%s", logline);
+            fprintf(fhwdetect, "%s", logline);
         }
         else {
             char *module = NULL;
@@ -511,14 +511,14 @@
                     /* Special case, nVidia PCI bridge_other not using 
forcedeth driver */
                     snprintf(logline, STRING_SIZE, "  Skip (bridge_other) %04x 
%04x:%04x\n",
                             pcidev->device_class, pcidev->vendor_id, 
pcidev->device_id);
-                    fprintf(flog, logline);
-                    fprintf(fhwdetect, logline);
+                    fprintf(flog, "%s", logline);
+                    fprintf(fhwdetect, "%s", logline);
                 }
                 else {
                     snprintf(logline, STRING_SIZE, "  Add  %04x %04x:%04x, 
%s\n",
                             pcidev->device_class, pcidev->vendor_id, 
pcidev->device_id, description);
-                    fprintf(flog, logline);
-                    fprintf(fhwdetect, logline);
+                    fprintf(flog, "%s", logline);
+                    fprintf(fhwdetect, "%s", logline);
 
                     hardwareadd(type, module, NULL, NULL, description, 
pcidev->vendor_id, pcidev->device_id);
                 }
@@ -527,8 +527,8 @@
                 /* There is little to add if there is no module */
                 snprintf(logline, STRING_SIZE, "  Skip (no module) %04x 
%04x:%04x\n",
                         pcidev->device_class, pcidev->vendor_id, 
pcidev->device_id);
-                fprintf(flog, logline);
-                fprintf(fhwdetect, logline);
+                fprintf(flog, "%s", logline);
+                fprintf(fhwdetect, "%s", logline);
             }
         }
 
@@ -648,8 +648,8 @@
         if (type == none) {
             snprintf(logline, STRING_SIZE, "  Skip %02x %04x:%04x, %s\n",
                     descriptor.bDeviceClass, descriptor.idVendor, 
descriptor.idProduct, description);
-            fprintf(flog, logline);
-            fprintf(fhwdetect, logline);
+            fprintf(flog, "%s", logline);
+            fprintf(fhwdetect, "%s", logline);
         }
         else {
             char *module = NULL;
@@ -671,8 +671,8 @@
             if (module != NULL) {
                 snprintf(logline, STRING_SIZE, "  Add  %02x %04x:%04x, %s\n",
                         descriptor.bDeviceClass, descriptor.idVendor, 
descriptor.idProduct, description);
-                fprintf(flog, logline);
-                fprintf(fhwdetect, logline);
+                fprintf(flog, "%s", logline);
+                fprintf(fhwdetect, "%s", logline);
 
                 hardwareadd(network, module, NULL, NULL, description, 
descriptor.idVendor, descriptor.idProduct);
             }
@@ -680,8 +680,8 @@
                 /* There is little to add if there is no module */
                 snprintf(logline, STRING_SIZE, "  Skip (no module) %02x 
%04x:%04x\n",
                         descriptor.bDeviceClass, descriptor.idVendor, 
descriptor.idProduct);
-                fprintf(flog, logline);
-                fprintf(fhwdetect, logline);
+                fprintf(flog, "%s", logline);
+                fprintf(fhwdetect, "%s", logline);
             }
         }
     }
@@ -837,7 +837,7 @@
 
     snprintf(logline, STRING_SIZE, "Scan complete. Hardware %d, Harddisk %d, 
CDROM %d, Network %d\n", numhardwares, numharddisk,
             numcdrom, numnetwork);
-    fprintf(flog, logline);
-    fprintf(fhwdetect, logline);
+    fprintf(flog, "%s", logline);
+    fprintf(fhwdetect, "%s", logline);
     fclose(fhwdetect);
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to