mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-03 07:11:20 +00:00
Consider cppchecks (performance) warnings.
This commit is contained in:
parent
5acde18ef1
commit
b5ead871ef
1 changed files with 0 additions and 6 deletions
6
test.c
6
test.c
|
@ -484,7 +484,6 @@ task_template_t *task_template_compile(const char *file, const char *dir, size_t
|
||||||
FILE *tempfile = NULL;
|
FILE *tempfile = NULL;
|
||||||
task_template_t *tmpl = NULL;
|
task_template_t *tmpl = NULL;
|
||||||
|
|
||||||
memset (fullfile, 0, sizeof(fullfile));
|
|
||||||
snprintf(fullfile, sizeof(fullfile), "%s/%s", dir, file);
|
snprintf(fullfile, sizeof(fullfile), "%s/%s", dir, file);
|
||||||
|
|
||||||
tempfile = fs_file_open(fullfile, "r");
|
tempfile = fs_file_open(fullfile, "r");
|
||||||
|
@ -648,7 +647,6 @@ bool task_propagate(const char *curdir, size_t *pad, const char *defs) {
|
||||||
dir = opendir(curdir);
|
dir = opendir(curdir);
|
||||||
|
|
||||||
while ((files = readdir(dir))) {
|
while ((files = readdir(dir))) {
|
||||||
memset (buffer, 0,sizeof(buffer));
|
|
||||||
snprintf(buffer, sizeof(buffer), "%s/%s", curdir, files->d_name);
|
snprintf(buffer, sizeof(buffer), "%s/%s", curdir, files->d_name);
|
||||||
|
|
||||||
if (stat(buffer, &directory) == -1) {
|
if (stat(buffer, &directory) == -1) {
|
||||||
|
@ -695,7 +693,6 @@ bool task_propagate(const char *curdir, size_t *pad, const char *defs) {
|
||||||
* which will be refered to with a handle in the task for
|
* which will be refered to with a handle in the task for
|
||||||
* reading the data from the pipe.
|
* reading the data from the pipe.
|
||||||
*/
|
*/
|
||||||
memset (buf,0,sizeof(buf));
|
|
||||||
if (qcflags) {
|
if (qcflags) {
|
||||||
if (tmpl->testflags && !strcmp(tmpl->testflags, "-no-defs")) {
|
if (tmpl->testflags && !strcmp(tmpl->testflags, "-no-defs")) {
|
||||||
snprintf(buf, sizeof(buf), "%s %s/%s %s %s -o %s",
|
snprintf(buf, sizeof(buf), "%s %s/%s %s %s -o %s",
|
||||||
|
@ -757,7 +754,6 @@ bool task_propagate(const char *curdir, size_t *pad, const char *defs) {
|
||||||
* Open up some file desciptors for logging the stdout/stderr
|
* Open up some file desciptors for logging the stdout/stderr
|
||||||
* to our own.
|
* to our own.
|
||||||
*/
|
*/
|
||||||
memset (buf,0,sizeof(buf));
|
|
||||||
snprintf(buf, sizeof(buf), "%s.stdout", tmpl->tempfilename);
|
snprintf(buf, sizeof(buf), "%s.stdout", tmpl->tempfilename);
|
||||||
task.stdoutlogfile = util_strdup(buf);
|
task.stdoutlogfile = util_strdup(buf);
|
||||||
if (!(task.stdoutlog = fs_file_open(buf, "w"))) {
|
if (!(task.stdoutlog = fs_file_open(buf, "w"))) {
|
||||||
|
@ -765,7 +761,6 @@ bool task_propagate(const char *curdir, size_t *pad, const char *defs) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset (buf,0,sizeof(buf));
|
|
||||||
snprintf(buf, sizeof(buf), "%s.stderr", tmpl->tempfilename);
|
snprintf(buf, sizeof(buf), "%s.stderr", tmpl->tempfilename);
|
||||||
task.stderrlogfile = util_strdup(buf);
|
task.stderrlogfile = util_strdup(buf);
|
||||||
if (!(task.stderrlog = fs_file_open(buf, "w"))) {
|
if (!(task.stderrlog = fs_file_open(buf, "w"))) {
|
||||||
|
@ -798,7 +793,6 @@ void task_precleanup(const char *curdir) {
|
||||||
dir = opendir(curdir);
|
dir = opendir(curdir);
|
||||||
|
|
||||||
while ((files = readdir(dir))) {
|
while ((files = readdir(dir))) {
|
||||||
memset(buffer, 0, sizeof(buffer));
|
|
||||||
if (strstr(files->d_name, "TMP") ||
|
if (strstr(files->d_name, "TMP") ||
|
||||||
strstr(files->d_name, ".stdout") ||
|
strstr(files->d_name, ".stdout") ||
|
||||||
strstr(files->d_name, ".stderr"))
|
strstr(files->d_name, ".stderr"))
|
||||||
|
|
Loading…
Reference in a new issue