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: 168444 Delivered-To: patches@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1487544ilk; Wed, 3 Jul 2019 16:10:47 -0700 (PDT) X-Received: by 2002:a17:902:23:: with SMTP id 32mr45181403pla.34.1562195447475; Wed, 03 Jul 2019 16:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562195447; cv=none; d=google.com; s=arc-20160816; b=ucgVT6lhrmxCu7HvAthp1gLcPCPUKh2unFINGf9wPNnSkaLuHlO0RwwSgw4Vw56buW DMpksOrb3dtlg+ITuwAI2zoYpMOyjQPLdDICbNOE++vXaTyJN/qynfsdF3iKQdim/gSm Z8q1jU1ext9xAtEtzeB0wUO90o+PnDsesb4TtYPat26TEZw4X+uDSgSAcEJXDnYLPjKx xuR4QNtNT8dg3rvzm77xbXeZinGb9kg/Bfd8VwB0mrMkeLysMg8bG+VwkwcrFdR1sLj6 2ZAnlWJ3KNnZGxB44ksvNLpUpl0btpoY8Nc1g4GrGUGaNSBso1QE9XFYOzBCV4ft+0KS Vtrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=tF6PJXwXdA+T8gXlP/iy+yAeb6/0Jnz/ftcQAzJBllI=; b=l2fuwIYixa37CGrBSghLwbyZjDohI89Oip6dQLRfdXY0Y068G1kbI3dF7EXVrbUsNB kfy55hLI08gj/YBAkDf018VkNYB5jIX4+uyLP8gzpfgk6gLtEjrhF+OmCVY5TtDQ9OBF /0Zjo7RWX8PYMv7hBTCZwoFaTaP+GcptNt0Tk7du6lpwFosLADm6OU3oDBYFyDbQUL2T rWVgJHm65Wv4qSqKZ3UqVzk5neK/NWb4xQQJs1jg5u2KgW69zD7n5b0QxjtDulL1TQn0 9Mv4cSj3E9S71T+4DFz/iWuIX7mmzStdd61oGfERrR80EUaAL4ydABam/3xmVLS6qF88 rMtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WZeVy0Zk; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id f16sor1864279pgn.77.2019.07.03.16.10.47 for (Google Transport Security); Wed, 03 Jul 2019 16:10:47 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WZeVy0Zk; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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=c8BU80jCimYkm6ZjS/VxdtWIAdRBIVvCIHFdaBigB3tuIqtQrbNKsFVf1wjSlqLPKk yt1cf6/NBW8ES2LLGL60N6IH238PwTnMzeopkr782q6orDjGvqdBX7DPVCOvFIJVTYrR 1H3eniodxO2tFUr6tZl5n2t9gZz8dwNxbNJ2UKnqqDtJXCN+kQlsabarBfhcXhfNuP3/ NizI2dYzWtOiVNvu1S/6RrZv55LKpxAEen/TDscQ3O27/5RkgKt355HtmPRCRw0qAMQN UkOr50g5k+t6BVimVLeh4o4VoKwemhZVquaUnLmlD/xaSfTmCdMMqwmRHUp5qBfmfEsn sZeg== X-Gm-Message-State: APjAAAVrLEf1DGrkTsm+UVCPPe5XBXqsNlScljiQU0DFWg94dLJP86bP Dn4DStksWhsqtBZ50gUA8XYSrBiA 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) Return-Path: 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 Cc: John Stultz , Rob Clark , Emil Velikov , Amit Pundir , Sumit Semwal , Alistair Strachan , Greg Hartman , =?utf-8?q?Tapani_P=C3=A4lli?= , =?utf-8?b?TWFyZWsgT2zFocOhaw==?= 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 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(+) -- 2.17.1 Signed-off-by: John Stultz <john.stultz@linaro.org>
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