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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
diff -urN syrep-0.6.orig/configure syrep-0.6/configure
--- syrep-0.6.orig/configure 2004-12-22 22:46:14.000000000 -0500
+++ syrep-0.6/configure 2004-12-22 23:59:50.000772536 -0500
@@ -2830,7 +2830,7 @@
# If using GCC specifiy some additional parameters
if test "x$GCC" = "xyes" ; then
- CFLAGS="$CFLAGS -pipe -Wall -W -Wno-unused-parameter"
+ CFLAGS="$CFLAGS -Wall -W -Wno-unused-parameter"
fi
if type -p stow > /dev/null && test -d /usr/local/stow ; then
diff -urN syrep-0.6.orig/src/forget.c syrep-0.6/src/forget.c
--- syrep-0.6.orig/src/forget.c 2004-12-22 22:46:14.000000000 -0500
+++ syrep-0.6/src/forget.c 2004-12-22 23:59:06.277419496 -0500
@@ -168,7 +168,7 @@
t = args.remember_arg*24*60*60;
time(&now);
- limit = t > now ? 0 : now-t;
+ limit = (time_t)t > now ? 0 : now-t;
if (args.verbose_flag) {
fprintf(stderr, "Current time is %s", ctime(&now));
diff -urN syrep-0.6.orig/src/merge.c syrep-0.6/src/merge.c
--- syrep-0.6.orig/src/merge.c 2004-12-22 22:46:14.000000000 -0500
+++ syrep-0.6/src/merge.c 2004-12-22 23:59:06.277419496 -0500
@@ -153,7 +153,7 @@
const char *p;
char *d;
- for (p = path, d = dst; *p && d-dst < l-1; p++) {
+ for (p = path, d = dst; *p && d-dst < (signed)l-1; p++) {
if (*p == '/') {
*(d++) = '%';
*(d++) = '2';
diff -urN syrep-0.6.orig/src/package.c syrep-0.6/src/package.c
--- syrep-0.6.orig/src/package.c 2004-12-22 22:46:14.000000000 -0500
+++ syrep-0.6/src/package.c 2004-12-22 23:59:06.277419496 -0500
@@ -181,7 +181,7 @@
goto finish;
}
- if (n != t) {
+ if (n != (ssize_t)t) {
if ((r = (void*) p->write_z.next_in - d) > 0)
r --;
@@ -212,7 +212,7 @@
size_t t = MIN(l, CBUFSIZE);
ssize_t n;
- if ((n = loop_read(sfd, buf, t)) != t) {
+ if ((n = loop_read(sfd, buf, t)) != (ssize_t)t) {
fprintf(stderr, "read() : %s\n", n < 0 ? strerror(errno) : "EOF");
goto finish;
}
@@ -245,10 +245,10 @@
size_t t = MIN(l, CBUFSIZE);
ssize_t n;
- if (package_read(p, buf, t) != t)
+ if (package_read(p, buf, t) != (ssize_t)t)
goto finish;
- if ((n = loop_write(dfd, buf, t)) != t) {
+ if ((n = loop_write(dfd, buf, t)) != (ssize_t)t) {
fprintf(stderr, "write() : %s\n", n < 0 ? strerror(errno) : "EOF");
goto finish;
}
@@ -360,7 +360,7 @@
t = (void*) p->write_z.next_out - p->write_zbuf;
if (t) {
- if ((n = loop_write(p->write_fd, p->write_zbuf, t)) != t) {
+ if ((n = loop_write(p->write_fd, p->write_zbuf, t)) != (ssize_t)t) {
fprintf(stderr, "loop_write(): %s\n", n < 0 ? strerror(errno) : "EOF");
r = -1;
break;
diff -urN syrep-0.6.orig/src/syrep.c syrep-0.6/src/syrep.c
--- syrep-0.6.orig/src/syrep.c 2004-12-22 22:46:14.000000000 -0500
+++ syrep-0.6/src/syrep.c 2004-12-22 23:59:06.276419648 -0500
@@ -262,7 +262,7 @@
if (args.inputs_num < 1)
fprintf(stderr, "WARNING: No repository or snapshot to specified!\n");
- for (i = 0; i < args.inputs_num; i++) {
+ for (i = 0; (unsigned)i < args.inputs_num; i++) {
static char saved_cwd[PATH_MAX];
if (args.local_temp_flag && isdirectory(args.inputs[i]) >= 1) {
@@ -281,7 +281,7 @@
fprintf(stderr, "*** %s ***\n", path);
if (m && args.output_directory_given) {
- if (getcwd(saved_cwd, sizeof(saved_cwd)) < 0) {
+ if (getcwd(saved_cwd, sizeof(saved_cwd)) == NULL) {
fprintf(stderr, "getcwd(): %s\n", strerror(errno));
return -1;
}
@@ -304,7 +304,7 @@
}
}
- if (args.inputs_num > 1 && i < args.inputs_num-1)
+ if (args.inputs_num > 1 && (unsigned)i < args.inputs_num-1)
fprintf(stderr, "\n");
db_context_free(c);
@@ -340,7 +340,7 @@
goto finish;
}
- for (i = 0; i < args.inputs_num; i++) {
+ for (i = 0; (unsigned)i < args.inputs_num; i++) {
static char saved_cwd[PATH_MAX];
if (isdirectory(args.inputs[i]) <= 0) {
@@ -372,7 +372,7 @@
cache = md_cache_open(p, args.ro_cache_flag);
}
- if (getcwd(saved_cwd, sizeof(saved_cwd)) < 0) {
+ if (getcwd(saved_cwd, sizeof(saved_cwd)) == NULL) {
fprintf(stderr, "getcwd(): %s\n", strerror(errno));
goto finish;
}
@@ -429,7 +429,7 @@
if (args.inputs_num < 1)
fprintf(stderr, "WARNING: No repository specified!\n");
- for (i = 0; i < args.inputs_num; i++) {
+ for (i = 0; (unsigned)i < args.inputs_num; i++) {
if (isdirectory(args.inputs[i]) <= 0) {
fprintf(stderr, "%s is not a directory\n", args.inputs[i]);
@@ -442,7 +442,7 @@
if (cleanup(args.inputs[i]) < 0)
goto finish;
- if (args.inputs_num > 1 && i < args.inputs_num-1)
+ if (args.inputs_num > 1 && (unsigned)i < args.inputs_num-1)
fprintf(stderr, "\n");
}
@@ -461,7 +461,7 @@
if (args.inputs_num < 1)
fprintf(stderr, "WARNING: No repository or snapshot to specified!\n");
- for (i = 0; i < args.inputs_num; i++) {
+ for (i = 0; (unsigned)i < args.inputs_num; i++) {
if (args.local_temp_flag && isdirectory(args.inputs[i]) >= 1) {
const char *p = get_attached_filename(args.inputs[i], SYREP_TEMPDIR);
mkdir(p, 0777);
@@ -483,7 +483,7 @@
if (forget(c, target) < 0)
goto finish;
- if (args.inputs_num > 1 && i < args.inputs_num-1)
+ if (args.inputs_num > 1 && (unsigned)i < args.inputs_num-1)
fprintf(stderr, "\n");
db_context_free(c);
@@ -521,7 +521,7 @@
static void free_args(void) {
int i;
- for (i = 0; i < args.inputs_num; i++)
+ for (i = 0; (unsigned)i < args.inputs_num; i++)
free(args.inputs[i]);
free(args.inputs);
|