pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43291: [PATCH] lang/f2c needs some patches for gcc-4.4 (ubuntu 10.04)



>Number:         43291
>Category:       pkg
>Synopsis:       f2c needs some patch for gcc-4.4 (ubuntu 10.04)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 12 04:05:00 +0000 2010
>Originator:     Makoto Fujiwara
>Release:        Ubuntu 10.04
>Organization:
KINU Corporation
>Environment:
        
        
Linux ubuntu10 2.6.32-21-generic #32-Ubuntu SMP 
Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
>Description:
        On Ubuntu 10.04, gcc version is
        gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
        And it seems to me some check are strict now. It would be nice
        to add cast for types.
        The errors we got now are:
--------
cc1: warnings being treated as errors
data.c: In function 'setdata':
data.c:363: error: format '%d' expects type 'int', but argument 3 has type 
'ftnint'

format.c: In function 'p1get_const':
format.c:2366: error: format '%lx' expects type 'long unsigned int *', but 
argument 3 has type 'struct Constbloc  **'

p1output.c: In function 'p1_const':
p1output.c:210: error: format '%lx' expects type 'long unsigned int', but 
argument 5 has type 'tagptr'
--------
>How-To-Repeat:
        on Ubuntu, get bootstrap-pkgsrc
        cd lang/f2c
        bmake
>Fix:

Index: lang/f2c/distinfo
===================================================================
RCS file: /export/cvsync/pkgsrc/lang/f2c/distinfo,v
retrieving revision 1.25
diff -a -u -r1.25 distinfo
--- lang/f2c/distinfo   23 Dec 2009 00:48:20 -0000      1.25
+++ lang/f2c/distinfo   12 May 2010 03:59:09 -0000
@@ -6,3 +6,6 @@
 SHA1 (patch-aa) = f1224ff17cdc96f083a247dce88b690e8b939eb0
 SHA1 (patch-ad) = 7f204a45891e3632589ea8fb0e4e379a0a792dea
 SHA1 (patch-ak) = 8652a54df300ddd60d9b1a9594d312349b782cf4
+SHA1 (patch-al) = b75b84b0821cd0aa70372193b70b3ff7eb9cb3ab
+SHA1 (patch-am) = 3ea4552cd933b20e44a4f80c7bb5073452d86e67
+SHA1 (patch-an) = 8eb6bde80f8acc35a57ff8f79ee45339a5771044
Index: lang/f2c/patches/patch-al
===================================================================
RCS file: lang/f2c/patches/patch-al
diff -N lang/f2c/patches/patch-al
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lang/f2c/patches/patch-al   12 May 2010 03:59:09 -0000
@@ -0,0 +1,11 @@
+--- src/data.c.orig    2001-03-02 06:16:12.000000000 +0900
++++ src/data.c 2010-05-12 12:30:14.371695373 +0900
+@@ -360,7 +360,7 @@
+               k = elen - valp->vleng->constblock.Const.ci;
+               if(k > 0) {
+                       dataline(varname, offset, TYBLANK);
+-                      fprintf(dfile, "\t%d\n", k);
++                      fprintf(dfile, "\t%d\n", (int) k);
+                       }
+               break;
+ 
Index: lang/f2c/patches/patch-am
===================================================================
RCS file: lang/f2c/patches/patch-am
diff -N lang/f2c/patches/patch-am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lang/f2c/patches/patch-am   12 May 2010 03:59:09 -0000
@@ -0,0 +1,11 @@
+--- src/format.c.orig  2003-03-21 03:34:13.000000000 +0900
++++ src/format.c       2010-05-12 12:32:07.609998285 +0900
+@@ -2363,7 +2363,7 @@
+           result->vstg = 1;
+           break;
+       case TYCHAR:
+-          status = fscanf(infile, "%lx", resultp);
++          status = fscanf(infile, "%lx", (long unsigned int *) resultp);
+           break;
+       default:
+           erri ("p1get_const:  bad constant type '%d'", type);
Index: lang/f2c/patches/patch-an
===================================================================
RCS file: lang/f2c/patches/patch-an
diff -N lang/f2c/patches/patch-an
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lang/f2c/patches/patch-an   12 May 2010 03:59:09 -0000
@@ -0,0 +1,11 @@
+--- src/p1output.c.orig        2001-03-02 06:16:13.000000000 +0900
++++ src/p1output.c     2010-05-12 12:34:46.087109264 +0900
+@@ -207,7 +207,7 @@
+               err("p1_const:  bad vleng\n");
+           else
+               fprintf(pass1_file, "%d: %d %lx\n", P1_CONST, type,
+-                      cpexpr((expptr)cp));
++                      (long unsigned int) cpexpr((expptr)cp));
+           break;
+       default:
+           erri ("p1_const:  bad constant type '%d'", type);

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index