From patchwork Wed Jul 3 23:10:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11030621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2DEF214C0 for ; Wed, 3 Jul 2019 23:10:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A2B1287DA for ; Wed, 3 Jul 2019 23:10:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EA9A288E6; Wed, 3 Jul 2019 23:10:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8BC5C287DA for ; Wed, 3 Jul 2019 23:10:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BEE656E1CE; Wed, 3 Jul 2019 23:10:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by gabe.freedesktop.org (Postfix) with ESMTPS id E092E6E1CE for ; Wed, 3 Jul 2019 23:10:47 +0000 (UTC) Received: by mail-pf1-x436.google.com with SMTP id p184so1976645pfp.7 for ; Wed, 03 Jul 2019 16:10:47 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=tF6PJXwXdA+T8gXlP/iy+yAeb6/0Jnz/ftcQAzJBllI=; b=rABzHtwx7T9MezW4M9uR5FAdlbx+DrtDawb4+SUUGB8okl9vmSnL3cbtLx3U9kSzlb aqG8WpuyUMyNsfMWTtFq2LkxTKNwFLUQIK8aciaTWmyIcAzWNNQY0Lzh5kUWPvQr+Qtf 6TeKsgmyaSQSp96UVFrDHEEn06who7QJB0Pp/krKtzQtLBImbn+4aVNOcRIk9xX3q+nb OLYOiHfqXtv0G1pktfc3fMmDso9oWIzQOFga+UUcjMMssOxTY0KWy/7+Y0Lc+XvJaflF vctx6O+eBrCHXBDBgYai3ms0j8S0r4JseFlJvjUyJxIVLUdOH9ArhLe1+1MZXeO7ebsz et7A== X-Gm-Message-State: APjAAAXWs8+h6381DhlWHi5i5//mACczZa6Q6tfUFVVEGQdlkiDi/MdA GSAOOTw3DHBR+DYa+IxplhscN7EO4+Q= X-Google-Smtp-Source: APXvYqxqOiL71+JHD7kiOqPtzYaUORB/MoDxjxuRpjL8rEmqG5OYcc7dtk9le6lxOcbMQyEWAEW1UQ== X-Received: by 2002:a63:6089:: with SMTP id u131mr40875087pgb.314.1562195446644; Wed, 03 Jul 2019 16:10:46 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id d140sm3619876pfd.135.2019.07.03.16.10.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 16:10:45 -0700 (PDT) From: John Stultz To: dri-devel Subject: [PATCH 1/2] mesa: Fix clang build error w/ util_blitter_get_color_format_for_zs() Date: Wed, 3 Jul 2019 23:10:37 +0000 Message-Id: <20190703231038.73097-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tF6PJXwXdA+T8gXlP/iy+yAeb6/0Jnz/ftcQAzJBllI=; b=WZeVy0Zkdls1P75fLBaw1TMyb4jMYb0reqkeH0tvDineL9ech8ZM5EnZI7vqJ4ydhd dBvPr+1NxvBrkhOJSX2ZxdIPGSLkR4dj91mFCquH8Fo3rGnufat/kTVJqcna0vDhmESR z2r/A2C6rF8h9jVbmwl7mXqEbOrcTIn5aVBKrscVU8e7G4bSWvSIlagXNEEElyXjP481 xB/w3ge6bLbNRZloHosNnK35D4DrpT5dD3OofaqynM0wv8Az5HXqVJY2PyXDp6sXi/YC Ex5HbNjRf5i0Pe66Zo0+drQ9X2FUFUos24aIjcqKtNOugtRFO2hRE1JDSZ4cA1GaVaVA 7IPA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Amit Pundir , =?utf-8?b?TWFyZWsgT2zFocOhaw==?= , Greg Hartman , Emil Velikov , Alistair Strachan Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Building with clang, I'm seeing u_blitter.h:627:1: error: control may reach end of non-void function [-Werror,-Wreturn-type] The util_blitter_get_color_format_for_zs() asserts for any unhandled types, so we do not expect to reach the end of the function here. But provide a dummy return with an explicit assert above to ensure we don't hit it with any future changes to the logic. Cc: Rob Clark Cc: Emil Velikov Cc: Amit Pundir Cc: Sumit Semwal Cc: Alistair Strachan Cc: Greg Hartman Cc: Tapani Pälli Cc: Marek Olšák Signed-off-by: John Stultz --- src/gallium/auxiliary/util/u_blitter.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h index 9e3fa55e648..7d6c3db64da 100644 --- a/src/gallium/auxiliary/util/u_blitter.h +++ b/src/gallium/auxiliary/util/u_blitter.h @@ -624,6 +624,9 @@ util_blitter_get_color_format_for_zs(enum pipe_format format) default: assert(0); } + assert(0); + /*XXX NEVER GET HERE*/ + return PIPE_FORMAT_R32G32_UINT; } #ifdef __cplusplus