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

fseek(f, 40, SEEK_SET); fseek(f, 40, SEEK_SET);


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


failed = false; failed = false;


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

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

f = NULL; f = NULL;
if ((f = fopen(fname, "rb")) != NULL) { if ((f = fopen(fname, "rb")) != NULL) {
int ix; int ix;
int fd_temp;
int header[3]; int header[3];
char command[sizeof(fname2)+sizeof(fname2)+40]; char command[sizeof(fname2)+sizeof(fname2)+40];




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

Loading…
Cancel
Save