Browse Source

cleanup: fix cppcheck unusedVariable code smells

master
Juho Hiltunen 2 years ago
parent
commit
9be76c0b30
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      src/libespeak-ng/compiledata.c
  2. 1
    1
      src/libespeak-ng/soundicon.c

+ 1
- 1
src/libespeak-ng/compiledata.c View File

@@ -1207,13 +1207,13 @@ static int LoadWavefile(FILE *f, const char *fname)
fseek(f, 40, SEEK_SET);

if ((sr1 != samplerate_native) || (sr2 != sr1*2)) {
int fd_temp;
char command[sizeof(path_home)+250];

failed = false;

#ifdef HAVE_MKSTEMP
strcpy(fname_temp, "/tmp/espeakXXXXXX");
int fd_temp;
if ((fd_temp = mkstemp(fname_temp)) >= 0)
close(fd_temp);
#else

+ 1
- 1
src/libespeak-ng/soundicon.c View File

@@ -72,7 +72,6 @@ static espeak_ng_STATUS LoadSoundFile(const char *fname, int index, espeak_ng_ER
f = NULL;
if ((f = fopen(fname, "rb")) != NULL) {
int ix;
int fd_temp;
int header[3];
char command[sizeof(fname2)+sizeof(fname2)+40];

@@ -92,6 +91,7 @@ static espeak_ng_STATUS LoadSoundFile(const char *fname, int index, espeak_ng_ER

#ifdef HAVE_MKSTEMP
strcpy(fname_temp, "/tmp/espeakXXXXXX");
int fd_temp;
if ((fd_temp = mkstemp(fname_temp)) >= 0)
close(fd_temp);
#else

Loading…
Cancel
Save