Address splint warnings.
This commit is contained in:
@@ -43,7 +43,7 @@ struct opts_s {
|
||||
size_t buffer_size; /* buffer size, in bytes (0=default) */
|
||||
off_t size; /* total size of data */
|
||||
off_t error_skip_block; /* skip block size, 0 for adaptive */
|
||||
unsigned int remote; /* PID of pv to update settings of */
|
||||
pid_t remote; /* PID of pv to update settings of */
|
||||
unsigned int skip_errors; /* skip read errors counter */
|
||||
pid_t watch_pid; /* process to watch fds of */
|
||||
int watch_fd; /* fd to watch */
|
||||
|
||||
+1
-1
@@ -619,7 +619,7 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
case 'R':
|
||||
opts->remote = pv_getnum_count(optarg, false);
|
||||
opts->remote = (pid_t) pv_getnum_count(optarg, false);
|
||||
break;
|
||||
case 'P':
|
||||
opts->pidfile = pv_strdup(optarg);
|
||||
|
||||
+4
-2
@@ -57,10 +57,12 @@ struct remote_msg {
|
||||
* file associated with a particular process ID; it will be opened for
|
||||
* writing if "sender" is true. Returns NULL on error.
|
||||
*/
|
||||
/*@null@ */
|
||||
/*@dependent@ */
|
||||
static FILE *pv__control_file(char *filename, size_t bufsize, pid_t control_pid, bool sender)
|
||||
{
|
||||
int open_flags, open_mode, control_fd;
|
||||
FILE *control_fptr;
|
||||
/*@dependent@ */ FILE *control_fptr = NULL;
|
||||
|
||||
open_flags = O_RDONLY;
|
||||
#ifdef O_NOFOLLOW
|
||||
@@ -216,7 +218,7 @@ int pv_remote_set(opts_t opts, pvstate_t state)
|
||||
* Get the filename and file stream to use for remote control.
|
||||
*/
|
||||
memset(control_filename, 0, sizeof(control_filename));
|
||||
control_fptr = pv__control_file(control_filename, sizeof(control_filename), getpid(), true);
|
||||
control_fptr = pv__control_file(control_filename, sizeof(control_filename), (pid_t) getpid(), true);
|
||||
if (NULL == control_fptr) {
|
||||
pv_error(state, "%s", strerror(errno));
|
||||
return PV_ERROREXIT_REMOTE_OR_PID;
|
||||
|
||||
Reference in New Issue
Block a user