forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
castor-2.1.13.9-fix-arm-type-limits.patch
182 lines (173 loc) · 6.19 KB
/
castor-2.1.13.9-fix-arm-type-limits.patch
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
173
174
175
176
177
178
179
180
181
182
diff --git a/castor/server/BaseDaemon.cpp b/castor/server/BaseDaemon.cpp
index 4a213e6..cdf1c60 100644
--- a/castor/server/BaseDaemon.cpp
+++ b/castor/server/BaseDaemon.cpp
@@ -166,9 +166,9 @@ void castor::server::BaseDaemon::parseCommandLine(int argc, char *argv[])
Copterr = 0;
Coptreset = 1;
- char c;
+ int c;
while ((c = Cgetopt_long(argc, argv, (char*)m_cmdLineParams.str().c_str(), longopts, NULL)) != -1) {
- switch (c) {
+ switch ((char)c) {
case 'f':
m_foreground = true;
break;
diff --git a/client/src/stager/stager_client_commandline.cpp b/client/src/stager/stager_client_commandline.cpp
index 0139846..f8919f0 100644
--- a/client/src/stager/stager_client_commandline.cpp
+++ b/client/src/stager/stager_client_commandline.cpp
@@ -184,8 +184,7 @@ extern "C" {
int parseCmdLine(int argc, char *argv[], int (*callback)(const char *),
char** service_class, char** usertag, int* display_reqid)
{
- int Coptind, Copterr, errflg;
- char c;
+ int Coptind, Copterr, errflg, c;
static struct Coptions longopts[] =
{
{"filename", REQUIRED_ARGUMENT, NULL, 'M'},
@@ -202,7 +201,7 @@ int parseCmdLine(int argc, char *argv[], int (*callback)(const char *),
errflg = 0;
while ((c = Cgetopt_long (argc, argv, "f:M:S:U:rh", longopts, NULL)) != -1) {
- switch (c) {
+ switch ((char)c) {
case 'M':
if (0 != callback) {
callback(Coptarg);
diff --git a/client/src/stager/stager_qry.cpp b/client/src/stager/stager_qry.cpp
index e330017..90068a8 100644
--- a/client/src/stager/stager_qry.cpp
+++ b/client/src/stager/stager_qry.cpp
@@ -324,8 +324,7 @@ void handleDiskPoolQuery(int argc, char *argv[]) {
// -----------------------------------------------------------------------
int parseCmdLineFileQuery(int argc, char *argv[],
struct cmd_args *args) {
- int nbargs, errflg, getNextMode, i;
- char c;
+ int nbargs, errflg, getNextMode, i, c;
Coptind = 1;
Copterr = 1;
@@ -335,7 +334,7 @@ int parseCmdLineFileQuery(int argc, char *argv[],
while ((c = Cgetopt_long (argc, argv,
"M:f:E:F:U:r:nS:",
longopts_fileQuery, NULL)) != -1) {
- switch (c) {
+ switch ((char)c) {
case 'M':
args->requests[nbargs].type = BY_FILENAME;
args->requests[nbargs].param = (char *)strdup(Coptarg);
@@ -419,8 +418,7 @@ int parseCmdLineFileQuery(int argc, char *argv[],
int parseCmdLineDiskPoolQuery(int argc, char *argv[],
char** diskPool, char** svcClass, int *siflag,
enum castor::query::DiskPoolQueryType* queryType) {
- int errflg;
- char c;
+ int errflg, c;
Coptind = 1;
Copterr = 1;
@@ -430,7 +428,7 @@ int parseCmdLineDiskPoolQuery(int argc, char *argv[],
while ((c = Cgetopt_long (argc, argv,
"sd:S:iHat",
longopts_diskPoolQuery, NULL)) != -1) {
- switch (c) {
+ switch ((char)c) {
case 'd':
*diskPool = (char *)strdup(Coptarg);
break;
@@ -465,8 +463,7 @@ int parseCmdLineDiskPoolQuery(int argc, char *argv[],
// -----------------------------------------------------------------------
int checkAndCountArguments(int argc, char *argv[],
int* count, enum queryType* type) {
- int errflg;
- char c;
+ int errflg, c;
Coptind = 1;
Copterr = 1;
@@ -475,7 +472,7 @@ int checkAndCountArguments(int argc, char *argv[],
*type = FILEQUERY;
while ((c = Cgetopt_long
(argc, argv, "M:f:F:U:r:nhsd:S:iHat", longopts, NULL)) != -1) {
- switch (c) {
+ switch ((char)c) {
case 'M':
case 'F':
case 'U':
diff --git a/client/src/stager/stager_rm.c b/client/src/stager/stager_rm.c
index 162ef3f..16d2831 100644
--- a/client/src/stager/stager_rm.c
+++ b/client/src/stager/stager_rm.c
@@ -98,8 +98,7 @@ int cmd_parse(int argc,
struct stage_filereq **reqs,
int* nbreqs,
struct stage_options* opts) {
- int nbfiles, Coptind, Copterr, errflg;
- char c;
+ int nbfiles, Coptind, Copterr, errflg, c;
/* Counting the number of HSM files */
if ((*nbreqs = cmd_countHsmFiles(argc, argv)) < 0) {
@@ -118,7 +117,7 @@ int cmd_parse(int argc,
nbfiles = 0;
while ((c = Cgetopt_long
(argc, argv, "M:f:S:ha", longopts, NULL)) != -1) {
- switch (c) {
+ switch ((char)c) {
case 'M':
(*reqs)[nbfiles].filename = Coptarg;
nbfiles++;
@@ -169,15 +168,14 @@ int cmd_parse(int argc,
* or -1 if an error occured
*/
int cmd_countHsmFiles(int argc, char *argv[]) {
- int Coptind, Copterr, errflg, nbargs;
- char c;
+ int Coptind, Copterr, errflg, nbargs, c;
Coptind = 1;
Copterr = 1;
errflg = 0;
nbargs = 0;
while ((c = Cgetopt_long (argc, argv, "S:M:f:ha", longopts, NULL)) != -1) {
- switch (c) {
+ switch ((char)c) {
case 'M':
nbargs++;;
break;
diff --git a/client/src/stager/stager_setFileGCWeight.c b/client/src/stager/stager_setFileGCWeight.c
index 6063fe4..3d97371 100644
--- a/client/src/stager/stager_setFileGCWeight.c
+++ b/client/src/stager/stager_setFileGCWeight.c
@@ -95,8 +95,7 @@ int cmd_parse(int argc,
char *argv[],
struct stage_filereq **reqs,
int* nbreqs, char **service_class, float *weight) {
- int nbfiles, Coptind, Copterr, errflg;
- char c;
+ int nbfiles, Coptind, Copterr, errflg, c;
/* Counting the number of HSM files */
if ((*nbreqs = cmd_countHsmFiles(argc, argv)) < 0) {
@@ -115,7 +114,7 @@ int cmd_parse(int argc,
nbfiles = 0;
while ((c = Cgetopt_long
(argc, argv, "M:S:h", longopts, NULL)) != -1) {
- switch (c) {
+ switch ((char)c) {
case 'M':
(*reqs)[nbfiles].filename = Coptarg;
nbfiles++;
@@ -153,15 +152,14 @@ int cmd_parse(int argc,
* or -1 if an error occured
*/
int cmd_countHsmFiles(int argc, char *argv[]) {
- int Coptind, Copterr, errflg, nbargs;
- char c;
+ int Coptind, Copterr, errflg, nbargs, c;
Coptind = 1;
Copterr = 1;
errflg = 0;
nbargs = 0;
while ((c = Cgetopt_long (argc, argv, "M:S:h", longopts, NULL)) != -1) {
- switch (c) {
+ switch ((char)c) {
case 'M':
nbargs++;;
break;