[PATCH 3/5] remove ineffective assignments

Jani Nikula jani at nikula.org
Sun Aug 20 06:56:56 PDT 2017


On Fri, 16 Jun 2017, Piotr Trojanek <piotr.trojanek at gmail.com> wrote:
> Detected by cppecheck.

As I just commented about fixing shellcheck issues in
emacs/notmuch-emacs-mua, I'd really appreciate a build target to run the
static checkers, if available, and have them run as part of build (with
some checker option), release checks, make test, or as a separate
target. Otherwise the same errors creep right back in.

BR,
Jani.



> ---
>  notmuch-new.c | 2 +-
>  tag-util.c    | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git notmuch-new.c notmuch-new.c
> index e2822e23..4d40f3d0 100644
> --- notmuch-new.c
> +++ notmuch-new.c
> @@ -850,7 +850,7 @@ _remove_directory (void *ctx,
>  		   const char *path,
>  		   add_files_state_t *add_files_state)
>  {
> -    notmuch_status_t status = NOTMUCH_STATUS_SUCCESS;
> +    notmuch_status_t status;
>      notmuch_directory_t *directory;
>      notmuch_filenames_t *files, *subdirs;
>      char *absolute;
> diff --git tag-util.c tag-util.c
> index 30c2c077..d9fca7b8 100644
> --- tag-util.c
> +++ tag-util.c
> @@ -218,7 +218,6 @@ makes_changes (notmuch_message_t *message,
>      notmuch_bool_t changes = FALSE;
>  
>      /* First, do we delete an existing tag? */
> -    changes = FALSE;
>      for (tags = notmuch_message_get_tags (message);
>  	 ! changes && notmuch_tags_valid (tags);
>  	 notmuch_tags_move_to_next (tags)) {
> -- 
> 2.11.0
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list