Skip to content

Commit 3306ca4

Browse files
committed
cswrap-core: define all internal symbols as static
1 parent dc9c0fc commit 3306ca4

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

src/cswrap-core.c

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static void apply_del_arg(char **argv, const char *del_arg)
131131
}
132132
}
133133

134-
pid_t launch_tool(const char *tool, char **argv, const char **del_args)
134+
static pid_t launch_tool(const char *tool, char **argv, const char **del_args)
135135
{
136136
const pid_t pid = fork();
137137
if (pid < 0)
@@ -155,7 +155,7 @@ pid_t launch_tool(const char *tool, char **argv, const char **del_args)
155155
: /* command not executable */ 0x7E);
156156
}
157157

158-
int wait_for(const pid_t pid)
158+
static int wait_for(const pid_t pid)
159159
{
160160
for (;;) {
161161
siginfo_t si;
@@ -197,7 +197,7 @@ int wait_for(const pid_t pid)
197197
}
198198
}
199199

200-
bool is_def_inc(const char *arg)
200+
static bool is_def_inc(const char *arg)
201201
{
202202
return MATCH_PREFIX(arg, "-D")
203203
|| MATCH_PREFIX(arg, "-I")
@@ -207,7 +207,7 @@ bool is_def_inc(const char *arg)
207207
|| STREQ(arg, "-isystem")));
208208
}
209209

210-
bool is_bare_def_inc(const char *arg)
210+
static bool is_bare_def_inc(const char *arg)
211211
{
212212
return STREQ(arg, "-D")
213213
|| STREQ(arg, "-I")
@@ -217,7 +217,7 @@ bool is_bare_def_inc(const char *arg)
217217
|| STREQ(arg, "-isystem")));
218218
}
219219

220-
int /* args remain */ drop_arg(int *pargc, char **argv, const int i)
220+
static int /* args remain */ drop_arg(int *pargc, char **argv, const int i)
221221
{
222222
const int argc = --(*pargc);
223223
const int args_remain = argc - i;
@@ -226,7 +226,7 @@ int /* args remain */ drop_arg(int *pargc, char **argv, const int i)
226226
return args_remain;
227227
}
228228

229-
int translate_args_for_analyzer(int argc, char **argv)
229+
static int translate_args_for_analyzer(int argc, char **argv)
230230
{
231231
int cnt_files = 0;
232232

@@ -301,7 +301,7 @@ int translate_args_for_analyzer(int argc, char **argv)
301301
return argc;
302302
}
303303

304-
int num_custom_opts(const char *str)
304+
static int num_custom_opts(const char *str)
305305
{
306306
if (!str || !str[0])
307307
return 0;
@@ -313,7 +313,7 @@ int num_custom_opts(const char *str)
313313
return num;
314314
}
315315

316-
bool read_custom_opts(char **dst, const char *str)
316+
static bool read_custom_opts(char **dst, const char *str)
317317
{
318318
if (!str || !str[0])
319319
return true;
@@ -341,7 +341,9 @@ bool read_custom_opts(char **dst, const char *str)
341341
}
342342
}
343343

344-
void consider_running_analyzer(const int argc_orig, char **const argv_orig)
344+
static void consider_running_analyzer(
345+
const int argc_orig,
346+
char **const argv_orig)
345347
{
346348
/* clone the argv array */
347349
size_t argv_size = (argc_orig + 1) * sizeof(char *);
@@ -411,7 +413,10 @@ void consider_running_analyzer(const int argc_orig, char **const argv_orig)
411413
free(argv);
412414
}
413415

414-
int run_compiler_and_analyzer(const char *tool, const int argc, char **argv)
416+
static int run_compiler_and_analyzer(
417+
const char *tool,
418+
const int argc,
419+
char **argv)
415420
{
416421
if (!install_signal_forwarder())
417422
return fail("unable to install signal forwarder");

0 commit comments

Comments
 (0)