diff --git a/src/pv/file.c b/src/pv/file.c index 512f001..09207eb 100644 --- a/src/pv/file.c +++ b/src/pv/file.c @@ -325,15 +325,14 @@ int pv_next_file(pvstate_t state, unsigned int filenum, int oldfd) if ((NULL == next_filename) || (0 == strcmp(next_filename, "-"))) { fd = STDIN_FILENO; } else { - fd = open(next_filename, O_RDONLY); /* flawfinder: ignore */ + fd = open(next_filename, O_RDONLY); /* flawfinder: ignore */ /* * flawfinder rationale: the input file list is under the * control of the operator by its nature, so we can't refuse * to open symlinks etc as that would be counterintuitive. */ if (fd < 0) { - pv_error("%s: %s: %s", - _("failed to read file"), next_filename, strerror(errno)); + pv_error("%s: %s: %s", _("failed to read file"), next_filename, strerror(errno)); state->status.exit_status |= PV_ERROREXIT_ACCESS; return -1; } @@ -370,8 +369,7 @@ int pv_next_file(pvstate_t state, unsigned int filenum, int oldfd) input_file_is_output = false; if (input_file_is_output) { - pv_error("%s: %s", _("input file is output file"), - NULL == next_filename ? "-" : next_filename); + pv_error("%s: %s", _("input file is output file"), NULL == next_filename ? "-" : next_filename); (void) close(fd); state->status.exit_status |= PV_ERROREXIT_OUROBOROS; return -1; diff --git a/src/pv/state.c b/src/pv/state.c index a7d0061..4f9bef1 100644 --- a/src/pv/state.c +++ b/src/pv/state.c @@ -667,7 +667,7 @@ void pv_state_set_terminal_supports_utf8(pvstate_t state, bool val) void pv_state_inputfiles(pvstate_t state, unsigned int input_file_count, const char **input_files) { unsigned int file_idx; - /*@only@*/ nullable_string_t *new_array; + /*@only@ */ nullable_string_t *new_array; /* Free the old array and its contents, if there was one. */ if (NULL != state->files.filename) { @@ -691,7 +691,7 @@ void pv_state_inputfiles(pvstate_t state, unsigned int input_file_count, const c /* Populate the new array with copies of the filenames. */ for (file_idx = 0; file_idx < input_file_count; file_idx++) { - /*@only@*/ char *new_string; + /*@only@ */ char *new_string; new_string = pv_strdup(input_files[file_idx]); if (NULL == new_string) { /*@-mustfreefresh@ *//* see similar _() issue above */