mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04: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
|
|
@ -416,12 +416,13 @@ struct snapraid_handle* handle_map(struct snapraid_state* state, unsigned* handl
|
|||
tommy_node* k;
|
||||
|
||||
/* search the mapping for this disk */
|
||||
map = 0;
|
||||
for (k = state->maplist; k != 0; k = k->next) {
|
||||
map = k->data;
|
||||
if (strcmp(disk->name, map->name) == 0)
|
||||
break;
|
||||
}
|
||||
if (k == 0) {
|
||||
if (!map) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal error for inconsistent disk mapping.\n");
|
||||
os_abort();
|
||||
|
|
|
|||
|
|
@ -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