From afffedade370a69234394e918f7b3edaa9353d58 Mon Sep 17 00:00:00 2001 From: Eddie Antonio Santos Date: Tue, 5 Jan 2016 08:34:12 -0700 Subject: [PATCH] Fix Clang warnings. --- editop/editop.c | 4 ++-- synctext/synctext.c | 2 +- vote/vote.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/editop/editop.c b/editop/editop.c index 407df25..218c8c9 100644 --- a/editop/editop.c +++ b/editop/editop.c @@ -170,8 +170,8 @@ Candidate candidate[]; reduction++; if (candidate[i].for_deletion) reduction++; - if (reduction > move_reduction || reduction == move_reduction && - candidate[i].sync->substr->length < move_length) + if (reduction > move_reduction || (reduction == move_reduction && + candidate[i].sync->substr->length < move_length)) { move_i = i; move_length = candidate[i].sync->substr->length; diff --git a/synctext/synctext.c b/synctext/synctext.c index cbd78fd..752bd81 100644 --- a/synctext/synctext.c +++ b/synctext/synctext.c @@ -152,7 +152,7 @@ char *argv[]; int i; Synclist synclist1, synclist2; initialize(&argc, argv, usage, option); - if (argc < 2 || transpose && argc > 2) + if (argc < 2 || (transpose && argc > 2)) error("invalid number of text files"); text = NEW_ARRAY(argc, Text); for (i = 0; i < argc; i++) diff --git a/vote/vote.c b/vote/vote.c index 3b507e3..f8d2838 100644 --- a/vote/vote.c +++ b/vote/vote.c @@ -118,11 +118,12 @@ char *argv[]; if (wfraction && !valid_fraction(wfraction, &suspect_weight, &unmarked_weight)) error_string("invalid weight", wfraction); - if (sfraction) + if (sfraction) { if (valid_fraction(sfraction, &m, &n)) suspect_threshold = actual_voters * unmarked_weight * m / n; else error_string("invalid threshold", sfraction); + } } /**********************************************************************/