From patchwork Thu Mar 19 19:33:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 184706 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp2369052ile; Thu, 19 Mar 2020 12:36:47 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsRbGZtkpdFWjpCoX3jRudtXDagR5XRuinP3Bt4H+rzpZWPiAuPYhhz7pYLBTireV1d2DFI X-Received: by 2002:aed:2a55:: with SMTP id k21mr4834484qtf.159.1584646607018; Thu, 19 Mar 2020 12:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584646607; cv=none; d=google.com; s=arc-20160816; b=WBgX3oLQHuI6ytafX+en3Iez2QwYNSo0lYDmlAHzSBH2Xo83pa53ykBSahNSNgX4Uh m2wBue/HCa/AXtJrkN4yTJgsIyl5XD2EJ2nJlr8zMgFL6wUp4clh8IqfUo2QBz2Pkv21 pn8TOGFoBvf7mn8xebLuIGOCRdfe9UIQCF+prkBEPaa6iiUCynvdGSY8tJtK/kM4VPln R0vGb0vwEhgwiCrZVRBEWXGewLZEtZ1/rpl25aznpj73Jbgyl9L1f/kuownzxYoGE6RY De44SPteId8LULAu4iE80tdk6cbzbY/6FNbpyezds/DRgI+8qznps96Z2ecRgj1WybU3 e0Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QFHCsQgndAIVNPG9R5oLtcytKTpUJCNgdX7D4zaqb8o=; b=VZG404e4/FJ2bUE9oIlVkmEeOZibdYMJMNolTgV9/MxKFln6Xfx50zEt6rEYC+4sec 9fHCfHhGKxDpfL1xs6oKpSBqZZOpJzAxi1BJfgYSpUf5tbjLyOiejgVxPboaz2TUcwVn X3Ar2W+kkC2uOiZNH/piaGvKugT9bwpQAfhmzhontMWPht5osIUk8Bi8WpeG7apiIqJo A2Eyqwf5tTUmEyYtDFrxYHzY9jM2PfIYGh+yaoKb5PMcAuv3o5pFBH3+5zdN7yQAwenT Z7aJYE2C0qSHqciu5OgKSQkXmnfn+07K/wYBMv/0dO+L5RHI7YFI7G23vzRF6g5LwoSs f6nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HZnbEhEt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o11si2024940qke.53.2020.03.19.12.36.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Mar 2020 12:36:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HZnbEhEt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jF0yE-0000HG-J3 for patch@linaro.org; Thu, 19 Mar 2020 15:36:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58085) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jF0v6-0004HE-Ik for qemu-devel@nongnu.org; Thu, 19 Mar 2020 15:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jF0v5-0005tq-Fn for qemu-devel@nongnu.org; Thu, 19 Mar 2020 15:33:32 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:38576) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jF0v5-0005rq-9N for qemu-devel@nongnu.org; Thu, 19 Mar 2020 15:33:31 -0400 Received: by mail-wm1-x344.google.com with SMTP id l20so3745410wmi.3 for ; Thu, 19 Mar 2020 12:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QFHCsQgndAIVNPG9R5oLtcytKTpUJCNgdX7D4zaqb8o=; b=HZnbEhEtprEyZe0hBcXSwd2zypShGKy/o2KJ7qX8RFxFFPm9J4TQUDWw8dMz3q5zzQ KIPF9hMnZ9LXAM3ficXklUI5hwr6pgV/MzW/EurzvosxdcBJ5k9JnFL/dnvUwzU6W7k3 M7xkP1rlCGjgJrC6d3QU3xbdw51HTlMEalbnpbt3sc00lNYN46FQkbAWT9E5obIbMSxL y+wT33rQ+gB3GSO/62cQ82Vpg6CGomvGlUCJvlRqt0jK6MdNw/HVJjagpQtFj2i2/2vM Yx8Ooi4MOg0Xw83i1w0dlrCoQ3y5rtPM4XueUwla5ZEwhl0x5ANOMUDbCWXfT8m2Nu06 CxNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QFHCsQgndAIVNPG9R5oLtcytKTpUJCNgdX7D4zaqb8o=; b=AkgGdm734BTb2pKLlD9q45Mp+B6kicPbKNu0Tp7JP25xzoskCLIGQrPgPzVgN/ZcWg vA1mvnZ4PBh64uJ1j96/Hy96Y7fm3v4Nlsan2PLJ1aLCLbUGfQnnXIMglJAZxTn1ezNO Od6zKKASs+MvnqpQUIXVqfWGJP8I3CdJ9Jg6WEBoDnfHtxy6+PQQbYQbRCzWlqs+88u8 W9yy41nYv+qPa/r6tEunwakStOIzods2DrmBzRKxIprhjVjNPmfEA0pOJHtiPCaNJ67f V9OC+3NDELVnwMrFvpDg6Oja+XUP6M3Mdh1HXSKldZzTWBYUhuq0GhEL9GcpgozqRSHE +rnw== X-Gm-Message-State: ANhLgQ01KBefv1oYYUv0BBZDYzfR/uPexKp7HTgRx0Lf+ZGW3S69MtNQ BxZ9XEM8ILAvj6H2TzmdBRqD8gxlzN+Y9Q== X-Received: by 2002:a1c:2dc7:: with SMTP id t190mr5674694wmt.137.1584646408916; Thu, 19 Mar 2020 12:33:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id o9sm4984794wrw.20.2020.03.19.12.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 12:33:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v2 3/6] thread.h: Remove trailing semicolons from Coverity qemu_mutex_lock() etc Date: Thu, 19 Mar 2020 19:33:20 +0000 Message-Id: <20200319193323.2038-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200319193323.2038-1-peter.maydell@linaro.org> References: <20200319193323.2038-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" All the Coverity-specific definitions of qemu_mutex_lock() and friends have a trailing semicolon. This works fine almost everywhere because of QEMU's mandatory-braces coding style and because most callsites are simple, but target/s390x/sigp.c has a use of qemu_mutex_trylock() as an if() statement, which makes the ';' a syntax error: "../target/s390x/sigp.c", line 461: warning #18: expected a ")" if (qemu_mutex_trylock(&qemu_sigp_mutex)) { ^ Remove the bogus semicolons from the macro definitions. Signed-off-by: Peter Maydell --- include/qemu/thread.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé diff --git a/include/qemu/thread.h b/include/qemu/thread.h index 10262c63f58..d22848138ea 100644 --- a/include/qemu/thread.h +++ b/include/qemu/thread.h @@ -57,17 +57,17 @@ extern QemuCondTimedWaitFunc qemu_cond_timedwait_func; * hide them. */ #define qemu_mutex_lock(m) \ - qemu_mutex_lock_impl(m, __FILE__, __LINE__); + qemu_mutex_lock_impl(m, __FILE__, __LINE__) #define qemu_mutex_trylock(m) \ - qemu_mutex_trylock_impl(m, __FILE__, __LINE__); + qemu_mutex_trylock_impl(m, __FILE__, __LINE__) #define qemu_rec_mutex_lock(m) \ - qemu_rec_mutex_lock_impl(m, __FILE__, __LINE__); + qemu_rec_mutex_lock_impl(m, __FILE__, __LINE__) #define qemu_rec_mutex_trylock(m) \ - qemu_rec_mutex_trylock_impl(m, __FILE__, __LINE__); + qemu_rec_mutex_trylock_impl(m, __FILE__, __LINE__) #define qemu_cond_wait(c, m) \ - qemu_cond_wait_impl(c, m, __FILE__, __LINE__); + qemu_cond_wait_impl(c, m, __FILE__, __LINE__) #define qemu_cond_timedwait(c, m, ms) \ - qemu_cond_timedwait_impl(c, m, ms, __FILE__, __LINE__); + qemu_cond_timedwait_impl(c, m, ms, __FILE__, __LINE__) #else #define qemu_mutex_lock(m) ({ \ QemuMutexLockFunc _f = atomic_read(&qemu_mutex_lock_func); \