From nobody Wed Mar 22 22:28:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PhjmV3cs0z41P27; Wed, 22 Mar 2023 22:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PhjmV35Dlz3hS3; Wed, 22 Mar 2023 22:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679524106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53FZpzVroLg8QaDEYV56T3XwaJhQoUcfGxwBYPcXWgk=; b=SRYlm78lHbxdCeBp7jQ7X4iV/Ki0QflrgYWYCvy+3wLDVBnG9iCGfOw+CogPSVp8txlN2S XiyFid14SnjQPFuL3E2UCojfxxpAf+KsKTeZQ3NZdUtBGfWAVioa35wTfuioBcGLRP9uz2 kR5ujNM/rLXzI+NacvC67CfbBNBpM8I4Aqz2j0S3O11zEzZDo1zVjuU0Lpm9HN2v2GkE9/ pvWlnuQU3nfmunZuNLaiTIsC63Ns/6cXM2l11GXjR5plqvOAnDTu6O9u9jNxjbwEdt7dZC rrRLEQqDvDEtPjOj6B+SrCM3gOnCFG5ud3TWDv+jaOfjuD2hnAmbiEmnnUuUWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679524106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53FZpzVroLg8QaDEYV56T3XwaJhQoUcfGxwBYPcXWgk=; b=qApO9ww3+8HXxapITc5jofYf5Q8+HhNb8LPqBpbvoDO7+fm6hgbIvZ1tsYTZsLegSUxP3K +rCOKXIoPfSh34fL9u6RYy6k8UeAsVH0cQeJ8eR+/0A3G1/+ysDr5T6bAl7wp9JEqh+ub1 EBaoNYh11xJRXa83dA5t30R/w2FJBEc3rwgqmREn9ksuQS7zV7ZZVU7EHn0naTTQdq5p2s Gg330qmoqyT+Uve60QnAyw6AjUwWgyG1RSdxNXP17fPdeWo9LyF7pfPqUwduPR9FAxVWCy ZoNIyNmkGXmPQygwV4WcAqBe/5fqI7IUhTrA98ig3FKrtQps7uxjsyJ7E3H0AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679524106; a=rsa-sha256; cv=none; b=i0PnhVbgCIH9VsfUEmi08wbUQt5XHxwuJxqi06W7XDOhieRKdcNINpYeL4zxeZucc8jV27 WrDwX2vw9qmSM1c9a4H1xNSU+O0dBGHq4DHZrqpzTkJ+/STTVK+wH3Hw/WuS/qz2+ewSGL MX/pdP+dhwnFuN2HkJLQKacY92VDnI1ChsF6pSHyJwZG3wlpkbz0aM+4hSUHj4qsSevKBW 8i64/AYYyjZjTfOFX84YEqWaMtSYCoBx0OuwbAFQqhY6KebF7tQEcvTV9kY9CM1lP3K0hK 0i1EfggrO0zzhSHple6Vy6Hv2YXWjz1fOL8pN6yxFGF2OtBMiBUsTzeI9/7q9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PhjmV278xz19v5; Wed, 22 Mar 2023 22:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32MMSQ1D001593; Wed, 22 Mar 2023 22:28:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32MMSQcx001592; Wed, 22 Mar 2023 22:28:26 GMT (envelope-from git) Date: Wed, 22 Mar 2023 22:28:26 GMT Message-Id: <202303222228.32MMSQcx001592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 13ecd510decf - stable/12 - jemalloc: pick from upstream: Fix GCC-9.1 warning with macro GET_ARG_NUMERIC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 13ecd510decfec102ec8513a4fb239be4df33f2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=13ecd510decfec102ec8513a4fb239be4df33f2e commit 13ecd510decfec102ec8513a4fb239be4df33f2e Author: Ryan Libby AuthorDate: 2019-12-21 02:44:38 +0000 Commit: John Baldwin CommitDate: 2023-03-22 00:00:51 +0000 jemalloc: pick from upstream: Fix GCC-9.1 warning with macro GET_ARG_NUMERIC Pick 2d6d099fed05b1509e81e54458516528bfbbf38d from upstream jemalloc: Fix GCC-9.1 warning with macro GET_ARG_NUMERIC GCC-9.1 reports following error when trying to compile file src/malloc_io.c and with CFLAGS='-Werror' : src/malloc_io.c: In function ‘malloc_vsnprintf’: src/malloc_io.c:369:2: error: case label value exceeds maximum value for type [-Werror] 369 | case '?' | 0x80: \ | ^~~~ src/malloc_io.c:581:5: note: in expansion of macro ‘GET_ARG_NUMERIC’ 581 | GET_ARG_NUMERIC(val, 'p'); | ^~~~~~~~~~~~~~~ ... cc1: all warnings being treated as errors make: *** [Makefile:388: src/malloc_io.sym.o] Error 1 The warning is reported as by default the type 'char' is 'signed char' and or-ing 0x80 will turn the case label char negative which will be beyond the printable ascii range (0 - 127). The patch fixes this by explicitly casting the 'len' variable as unsigned char' inside the 'switch' statement so that value of expression " '?' | 0x80 " falls within the legal values of the variable 'len'. Discussed with: jasone (maintainer) Sponsored by: Dell EMC Isilon (cherry picked from commit 79457a8ad150d784f6c02c5e65e8b75c6836e651) --- contrib/jemalloc/src/malloc_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/jemalloc/src/malloc_io.c b/contrib/jemalloc/src/malloc_io.c index c8802c700310..8ca9dbdb3089 100644 --- a/contrib/jemalloc/src/malloc_io.c +++ b/contrib/jemalloc/src/malloc_io.c @@ -376,7 +376,7 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap) { } \ } while (0) #define GET_ARG_NUMERIC(val, len) do { \ - switch (len) { \ + switch ((unsigned char)len) { \ case '?': \ val = va_arg(ap, int); \ break; \