From nobody Tue Nov 21 14:12:51 2023 X-Original-To: freebsd-questions@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 4SZRDJ3SCVz51hZQ for ; Tue, 21 Nov 2023 14:13:04 +0000 (UTC) (envelope-from iam.mehdikhawari@gmail.com) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SZRDH5qVdz3gnK for ; Tue, 21 Nov 2023 14:13:03 +0000 (UTC) (envelope-from iam.mehdikhawari@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=i86Ba5hW; spf=pass (mx1.freebsd.org: domain of iam.mehdikhawari@gmail.com designates 2607:f8b0:4864:20::829 as permitted sender) smtp.mailfrom=iam.mehdikhawari@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-41cba6e8e65so32334701cf.2 for ; Tue, 21 Nov 2023 06:13:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700575983; x=1701180783; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=F0Pd+Gc+ssfc6b2/6iyP/wfmxLMOu6DlVMMDeuWfHwg=; b=i86Ba5hWDW/ADtViKUmpUB0Df8zLkbDli5Ef3h9SthQTAxm/fdnhiwQPxDNRI++NYF 2OicUPEXs2zgCK1hfwuVlIhAmZDzHEOh606L7Nd5NDU9w+88f7V+TJU/oDRCLXJCq0Vw QgHOJYpda/w0LTJhDZALCeKpQ1tfiRsFjjrJAuTV/ExCfMJ4+8sQOVc7p+mPNS2DssIQ adUla0SdSPKYMJstcsXRnUXTZVWsI3gP66r2gnjVrolgI9sv8sIyaXw5nGpmGkFqduxY r+E9kmV+C147hZ35i9ghHNtM1O9nVtU1WmjZ8S/Uhsi/4PK+p8iTZrBxSuYyeFCwcE+t jVyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700575983; x=1701180783; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=F0Pd+Gc+ssfc6b2/6iyP/wfmxLMOu6DlVMMDeuWfHwg=; b=rWoElJt2nspUj1unFyUr/43dYrM7X5EBYPdkERNrje2dkbAb50TAB+r5IedRkqzqwh QKpaM0+MhXZRLwzC1TQWhsOX/+m3x5Q7QLFvtt81J54eIyDSmo9QejOmJZnUvIH0Yw+q S3O2kxUfmiM8jSLj0zd371ryyFqdCSO0MGICtJEI/jcGTL7pSVf8r4qSX86uUG8Dso2+ pBawWiINJQPwR82l1Gu3phffQZpnga6Zp//uf5itgD527g7xvOtgEXr6/17SIubmMs5y J14KCibh0nhFKdiMOde09KYsH6OwUIEZRZ//YAeoYOGaFrkbykn5cuuaoNr26fK7aKKa LeeA== X-Gm-Message-State: AOJu0YzyHk4VT7141NgxDyJWsfYvLAdcSJk238bQ6i1I7mgUNUgh5Wa/ 5PqLNYenP8D9fmTxagH0UEHcioFYtYhT7Xa8jNgaNfhTBvc= X-Google-Smtp-Source: AGHT+IE8/MH6SNq/DO8//MHshkq2KBOQC2Tg3jjA111e6JP9VD4hUAU13CNgW8rUEZdJeE4FTtzf41A1BrzUInFEvGE= X-Received: by 2002:a05:622a:13cc:b0:41e:415c:728f with SMTP id p12-20020a05622a13cc00b0041e415c728fmr13216241qtk.38.1700575982665; Tue, 21 Nov 2023 06:13:02 -0800 (PST) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 From: Mehdi Khawari Date: Tue, 21 Nov 2023 15:12:51 +0100 Message-ID: Subject: What are __dead2 and __unused in the source code? To: freebsd-questions@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-3.00 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; TAGGED_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::829:from]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org] X-Rspamd-Queue-Id: 4SZRDH5qVdz3gnK X-Spamd-Bar: -- Hi, everyone! I'm just learning by studying the source code of some basic tools included in the base and I had a question. Why is __dead2 applied to some function like usage? static void usage(void) __dead2; What is the reason that __unused is applied to the function argument like here: static void siginfo_handler(int sig __unused) { siginfo = 1; } These snippets are from /bin/chmod/chmod.c. Where can I find more information on this? Kind regards Mehdi Khawari