mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: hide some false positives
Hide some false positives. Note: there must not a be blank line after coverity hiding comment.
This commit is contained in:
parent
cc7c41abbd
commit
d418fc14f4
@ -987,6 +987,7 @@ static void _monitor_unregister(void *arg)
|
||||
DEBUGLOG("Unregistering monitor for %s.", thread->device.name);
|
||||
_unregister_for_timeout(thread);
|
||||
|
||||
/* coverity[missing_lock] no missing lock here */
|
||||
if ((thread->status != DM_THREAD_REGISTERING) &&
|
||||
!_do_unregister_device(thread))
|
||||
log_error("%s: %s unregister failed.", __func__,
|
||||
@ -1969,6 +1970,7 @@ static void _daemonize(void)
|
||||
(void) close(fd);
|
||||
}
|
||||
|
||||
/* coverity[leaked_handle] dont't care */
|
||||
if ((open("/dev/null", O_RDONLY) < 0) ||
|
||||
(open("/dev/null", O_WRONLY) < 0) ||
|
||||
(open("/dev/null", O_WRONLY) < 0))
|
||||
|
@ -123,6 +123,7 @@ struct dm_pool *dmeventd_lvm2_pool(void)
|
||||
|
||||
int dmeventd_lvm2_run(const char *cmdline)
|
||||
{
|
||||
/* coverity[missing_lock] no locking for run part */
|
||||
return (lvm2_run(_lvm_handle, cmdline) == LVM2_COMMAND_SUCCEEDED);
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,6 @@ retry_fcntl:
|
||||
}
|
||||
|
||||
/* coverity[leaked_handle] intentional leak of fd handle here */
|
||||
|
||||
return 1;
|
||||
|
||||
fail_close_unlink:
|
||||
|
@ -899,6 +899,7 @@ static int _display_info_cols(struct dm_task *dmt, struct dm_info *info)
|
||||
goto_out;
|
||||
if (_selection_cmd && selected) {
|
||||
device_name = (char*) dm_task_get_name(dmt);
|
||||
/* coverity[overrun-buffer-val] _setgeometry never called from this place */
|
||||
if (!_selection_cmd->fn(_selection_cmd, NULL, 1, &device_name, NULL, 1))
|
||||
goto_out;
|
||||
}
|
||||
|
@ -222,7 +222,6 @@ retry_fcntl:
|
||||
}
|
||||
|
||||
/* coverity[leaked_handle] intentional leak of fd handle here */
|
||||
|
||||
return 1;
|
||||
|
||||
fail_close_unlink:
|
||||
|
@ -88,6 +88,7 @@ int become_daemon(struct cmd_context *cmd, int skip_lvm)
|
||||
_exit(ECMD_FAILED);
|
||||
}
|
||||
|
||||
/* coverity[leaked_handle] don't care */
|
||||
if ((dup2(null_fd, STDIN_FILENO) < 0) || /* reopen stdin */
|
||||
(dup2(null_fd, STDOUT_FILENO) < 0) || /* reopen stdout */
|
||||
(dup2(null_fd, STDERR_FILENO) < 0)) { /* reopen stderr */
|
||||
@ -113,7 +114,6 @@ int become_daemon(struct cmd_context *cmd, int skip_lvm)
|
||||
}
|
||||
|
||||
/* coverity[leaked_handle] null_fd does not leak here */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user