Package: xmcpustate
Severity: normal
Tags: patch

When building 'xmcpustate' on amd64 with gcc-4.0,
I get the following error:

gcc -c -Wall -g -O2  -I/usr/X11R6/include  xmcpustate.c
xmcpustate.c: In function 'xmalloc':
xmcpustate.c:146: error: conflicting types for 'malloc'
xmcpustate.c: In function 'main':
xmcpustate.c:180: error: invalid storage class for function 'update_display'
xmcpustate.c:355: error: 'update_display' undeclared (first use in this 
function)
xmcpustate.c:355: error: (Each undeclared identifier is reported only once
xmcpustate.c:355: error: for each function it appears in.)
make[1]: *** [xmcpustate.o] Error 1
make[1]: Leaving directory `/xmcpustate-3'
make: *** [build-stamp] Error 2

With the attached patch 'xmcpustate' can be compiled
on amd64 using gcc-4.0.

The attached patch includes a part which was already necessary with gcc-3.4.

Regards
Andreas Jochens

diff -urN ../tmp-orig/xmcpustate-3/xmcpustate.c ./xmcpustate.c
--- ../tmp-orig/xmcpustate-3/xmcpustate.c       2005-02-09 14:55:49.972045366 
+0100
+++ ./xmcpustate.c      2005-02-09 14:55:32.780370159 +0100
@@ -143,7 +143,6 @@
 char *
 xmalloc(int n)
 {
-       extern char *malloc();
        char *cp = malloc((unsigned) n);
        if (cp == NULL) {
                (void) fprintf(stderr, "Couldn't malloc %d bytes\n", n);
@@ -173,11 +172,12 @@
                (XtEventHandler)SetShellSize, NULL);
 }
 
+static void update_display();
+
 int 
 main(int argc, char **argv)
 {
        int i = 0, *iptr;
-       static void update_display();
        Widget topLevel;
        Widget form;
        Widget frame = NULL, subform = NULL;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to