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
|
diff -ur ps2eps-1.70.orig/src/C/bbox.c ps2eps-1.70/src/C/bbox.c
--- ps2eps-1.70.orig/src/C/bbox.c 2021-03-13 05:45:13.000000000 +0900
+++ ps2eps-1.70/src/C/bbox.c 2021-07-04 01:38:12.000000000 +0900
@@ -70,12 +70,14 @@
1
};
-unsigned int minus_one(const unsigned x)
+static
+unsigned int minus_one(const unsigned x)
{
return (x == 0) ? x : x-1;
}
-unsigned int plus_one(const unsigned x)
+static
+unsigned int plus_one(const unsigned x)
{
return (x == (unsigned int) ~0U) ? x : x+1;
}
@@ -96,8 +98,9 @@
* and printed to stdout *
************************************************************************/
/* calculate the bounding box in postscript points, given a resolution in dpi */
-void readppm_and_calcbb(const char *name,
- const unsigned int resolution,
+static
+void readppm_and_calcbb(const char *name,
+ const unsigned int resolution,
const unsigned char tight)
{
FILE *inputfile;
@@ -192,6 +195,7 @@
#ifdef DEBUG
fprintf(stderr,"\nreading picture: %s size X: %u Y: %u\n",name,width,height);
#endif
+ x = 0; /* avoid uninitialized warning */
x_min= width>0 ? width-1 : 0;
x_max= 0;
y_min= height>0 ? height-1 : 0;
|