File: gcc-15_examples.patch

package info (click to toggle)
volpack 1.0b3-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,948 kB
  • sloc: ansic: 12,201; sh: 9,078; makefile: 91; csh: 76
file content (152 lines) | stat: -rw-r--r-- 4,764 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Author: Andreas Tille <tille@debian.org>
Last-Update: 2025-10-06
Description: Make sure examples are building with gcc-15 and thus autopkgtest is passing

--- a/examples/classifyvolume.c
+++ b/examples/classifyvolume.c
@@ -35,9 +35,7 @@
 #include "volume.h"
 
 int
-main(argc, argv)
-int argc;
-char **argv;
+main(int argc, char **argv)
 {
     vpContext *vpc;	/* rendering context */
     int volume_fd;	/* file descriptor for volume (input) */
@@ -51,7 +49,6 @@ char **argv;
     float density_ramp[DENSITY_MAX+1];	/* opacity as a function of density */
     float gradient_ramp[GRADIENT_MAX+1];/* opacity as a function 
 					   of gradient magnitude */
-    void *malloc();
 
     /* check command-line arguments */
     use_octree = 0;
--- a/examples/makevolume.c
+++ b/examples/makevolume.c
@@ -43,7 +43,6 @@ main()
     unsigned volume_size;/* size of volume */
     int density_fd;	/* file descriptor for density file (input) */
     int volume_fd;	/* file descriptor for volume (output) */
-    void *malloc();
 
     /* create a context */
     vpc = vpCreateContext();
--- a/examples/scalevolume.c
+++ b/examples/scalevolume.c
@@ -44,9 +44,7 @@
 int write_den(char* filename, unsigned char* data, int xlen, int ylen, int zlen);
 
 int
-main(argc, argv)
-int argc;
-char **argv;
+main(int argc, char **argv)
 {
     char *src_file;				/* input file name */
     char *dst_file;				/* output file name */
@@ -58,8 +56,7 @@ char **argv;
     unsigned dst_xlen, dst_ylen, dst_zlen;	/* size of output data */
     unsigned dst_size;				/* size in bytes of output */
     int code;
-    double atof();
-    unsigned char *read_den();
+    unsigned char *read_den(char *filename, int *xptr, int *yptr, int *zptr);
 
     /* parse arguments */
     if (argc < 6 || argc > 7) {
--- a/examples/denfile.c
+++ b/examples/denfile.c
@@ -33,9 +33,9 @@ int write_bytes(int fd, char* buf, int b
  */
 
 unsigned char *
-read_den(filename, xptr, yptr, zptr)
-char *filename;		/* name of file containing data */
-int *xptr, *yptr, *zptr;/* volume dimensions (output parameters) */
+read_den(
+	char *filename,				/* name of file containing data */
+	int *xptr, int *yptr, int *zptr)	/* volume dimensions (output parameters) */
 {
     int fd;			/* file descriptor */
     unsigned char *data;	/* data array */
@@ -128,10 +128,10 @@ int *xptr, *yptr, *zptr;/* volume dimens
  */
 
 int
-write_den(filename, data, xlen, ylen, zlen)
-char *filename;		/* name of file to create */
-unsigned char *data;	/* volume data */
-int xlen, ylen, zlen;	/* volume dimensions */
+write_den(
+	char *filename,			/* name of file to create */
+	unsigned char *data,		/* volume data */
+	int xlen, int ylen, int zlen)	/* volume dimensions */
 {
     int fd;			/* file descriptor */
     short map_version;		/* Version of this .den file                 */
@@ -219,10 +219,10 @@ int xlen, ylen, zlen;	/* volume dimensio
  */
 
 int
-read_bytes(fd, buf, bytecount)
-int fd;		/* file descriptor to read from */
-char *buf;	/* memory in which to store data */
-int bytecount;	/* number of bytes to read */
+read_bytes(
+	int fd,		/* file descriptor to read from */
+	char *buf,	/* memory in which to store data */
+	int bytecount)	/* number of bytes to read */
 {
     int n;
 
@@ -248,11 +248,11 @@ int bytecount;	/* number of bytes to rea
  */
 
 int
-read_shorts(fd, sbuf, shortcount, swap)
-int fd;		/* file descriptor to read from */
-short *sbuf;	/* memory in which to store data */
-int shortcount;	/* number of shorts to read */
-int swap;	/* if nonzero then swap bytes */
+read_shorts(
+	int fd,		/* file descriptor to read from */
+	short *sbuf,	/* memory in which to store data */
+	int shortcount,	/* number of shorts to read */
+	int swap)	/* if nonzero then swap bytes */
 {
     int n, c;
     int bytecount = shortcount * 2;
@@ -297,11 +297,11 @@ int swap;	/* if nonzero then swap bytes
  */
 
 int
-read_words(fd, wbuf, wordcount, swap)
-int fd;		/* file descriptor to read from */
-int *wbuf;	/* memory in which to store data */
-int wordcount;	/* number of words to read */
-int swap;	/* if nonzero then swap bytes */
+read_words(
+	int fd,		/* file descriptor to read from */
+	int *wbuf,	/* memory in which to store data */
+	int wordcount,	/* number of words to read */
+	int swap)	/* if nonzero then swap bytes */
 {
     int n, c;
     int bytecount = wordcount * 4;
@@ -346,10 +346,10 @@ int swap;	/* if nonzero then swap bytes
  */
 
 int
-write_bytes(fd, buf, bytecount)
-int fd;		/* file descriptor to write to */
-char *buf;	/* memory containing data */
-int bytecount;	/* number of bytes to write */
+write_bytes(
+	int fd,		/* file descriptor to write to */
+	char *buf,	/* memory containing data */
+	int bytecount)	/* number of bytes to write */
 {
     int n;