[palp] Correct build with -Werror=format-security (#1037021)

pcpa pcpa at fedoraproject.org
Mon Dec 16 15:22:08 UTC 2013


commit 989afdf993e0b9cefeda8a171448b9249b2bcb13
Author: pcpa <paulo.cesar.pereira.de.andrade at gmail.com>
Date:   Mon Dec 16 13:21:55 2013 -0200

    Correct build with -Werror=format-security (#1037021)

 palp-format.patch |   45 +++++++++++++++++++++++++++++++++++++++++++++
 palp.spec         |    8 +++++++-
 2 files changed, 52 insertions(+), 1 deletions(-)
---
diff --git a/palp-format.patch b/palp-format.patch
new file mode 100644
index 0000000..bfad3a5
--- /dev/null
+++ b/palp-format.patch
@@ -0,0 +1,45 @@
+diff -up palp-2.1/Subadd.c.orig palp-2.1/Subadd.c
+--- palp-2.1/Subadd.c.orig	2013-12-16 13:09:48.608442334 -0200
++++ palp-2.1/Subadd.c	2013-12-16 13:11:29.003446178 -0200
+@@ -95,7 +95,7 @@ void Init_New_List(NF_List *S)
+ NF_List *AuxNFLptr=NULL;		/* dirty trick for Xmin Xmax Xdif */
+ void Init_NF_List(NF_List *L)
+ {    
+-     L->TIME= L->SAVE= time(NULL); printf(ctime(&L->TIME)); L->CLOCK= clock();
++     L->TIME= L->SAVE= time(NULL); printf("%s",ctime(&L->TIME)); L->CLOCK= clock();
+      L->IP_Time = L->NF_Time = 0;  L->d = L->nNF = L->nIP = L->nSLNF = 0;
+      
+      Init_FInfoList(&L->In);	if(*L->iname) Read_In_File(L);	
+diff -up palp-2.1/Subpoly.c.orig palp-2.1/Subpoly.c
+--- palp-2.1/Subpoly.c.orig	2013-12-16 13:09:41.926442078 -0200
++++ palp-2.1/Subpoly.c	2013-12-16 13:10:56.805444946 -0200
+@@ -866,7 +866,7 @@ void Do_the_Classification(CWS *W, PolyP
+ 
+   if(rFlag==0) Write_List_2_File(polyo,_NFL); 
+   _NFL->TIME=time(NULL); 
+-  printf(ctime(&_NFL->TIME));
++  printf("%s",ctime(&_NFL->TIME));
+   free(_NFL);
+ }
+ 
+@@ -1189,7 +1189,7 @@ void Find_Sublat_Polys(char mFlag, char
+     
+   printf("max_order=%d\n", max_order);
+   Write_List_2_File(polyo,_NFL); 
+-  _NFL->TIME=time(NULL); printf(ctime(&_NFL->TIME));
++  _NFL->TIME=time(NULL); printf("%s",ctime(&_NFL->TIME));
+   free(_NFL);
+ }
+ 
+diff -up palp-2.1/Subdb.c.orig palp-2.1/Subdb.c
+--- palp-2.1/Subdb.c.orig	2013-12-16 13:13:34.266450975 -0200
++++ palp-2.1/Subdb.c	2013-12-16 13:13:48.692451528 -0200
+@@ -1750,7 +1750,7 @@ void V_Sublat_Polys(char mr,char *dbin,c
+ 	}
+      }	if(*dbin) Close_DB(DB);
+      printf("max_order=%d\n", max_order); Write_List_2_File(polyo,_L); 
+-     _L->TIME=time(NULL); printf(ctime(&_L->TIME));
++     _L->TIME=time(NULL); printf("%s",ctime(&_L->TIME));
+      free(_L);
+ }
+ void VPHM_Sublat_Polys(char sFlag,char mr,char *dbin,char *polyi,char *polyo, 
diff --git a/palp.spec b/palp.spec
index 658ec4a..52ca8ed 100644
--- a/palp.spec
+++ b/palp.spec
@@ -10,6 +10,9 @@ Source0:        http://hep.itp.tuwien.ac.at/~kreuzer/CY/palp/palp-%{version}.tar
 # http://arxiv.org/pdf/1205.4147v1
 Source1:	1205.4147v1.pdf
 
+# Correct build with -Werror=format-security
+Patch0:		%{name}-format.patch
+
 %description
 PALP contains routines for vertex and facet enumeration, computation of
 incidences and symmetries, as well as completion of the set of lattice
@@ -22,7 +25,7 @@ toric Calabi-Yau varieties.
 
 %prep
 %setup -q
-
+%patch0 -p1
 
 %build
 cp -a %{SOURCE1} .
@@ -58,6 +61,9 @@ done
 
 
 %changelog
+* Mon Dec 16 2013 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 2.1-4
+* Correct build with -Werror=format-security (#1037021)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list