mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 14:20:05 -05:00
Remove warnings when building with low optimizations
This commit is contained in:
parent
584c362ba4
commit
c80fd07058
2 changed files with 6 additions and 3 deletions
|
|
@ -924,14 +924,16 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
|||
|
||||
pathcpy(state->parity[level].smartctl, sizeof(state->parity[level].smartctl), custom);
|
||||
} else {
|
||||
/* search the disk */
|
||||
struct snapraid_disk* disk;
|
||||
|
||||
/* search the disk */
|
||||
disk = 0;
|
||||
for (i = state->disklist; i != 0; i = i->next) {
|
||||
disk = i->data;
|
||||
if (strcmp(disk->name, buffer) == 0)
|
||||
break;
|
||||
}
|
||||
if (!i) {
|
||||
if (!disk) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Missing disk smartctl '%s' at line %u\n", buffer, line);
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue