<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div class="post-editor js-post-editor" style="margin:10px 0px 0px;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Liberation Sans", sans-serif;font-size:13px;box-sizing:border-box;color:rgb(35, 38, 41);text-align:left;background-color:rgb(255, 255, 255)">
<div class="s-prose mb16 wmd-preview js-wmd-preview" style="margin-top:0px;margin-bottom:16px !important;line-height:var(--s-prose-line-height);font-family:var(--theme-question-body-font-family);font-size:15px;overflow-wrap:break-word;clear:both">
<p style="margin-top:0px;margin-bottom:var(--s-prose-spacing);clear:both">Normally, the compiler warns if a variable is declared but is never referenced. In the Linux kernel source code, some unused functions and variables are marked<span> </span><code style="margin:0px;padding:2px 4px;font-family:var(--ff-mono);font-size:13px;background-color:var(--black-075);color:var(--black-800);border-radius:3px">__atrribute__((unused))</code>.</p>
<p style="margin-top:0px;margin-bottom:var(--s-prose-spacing);clear:both"><br>
</p>
<p style="margin-top:0px;margin-bottom:var(--s-prose-spacing);clear:both">==><span> </span><a href="https://livegrep.com/search/linux?q=__attribute__((unused))" style="margin:0px;text-decoration:underline;color:var(--theme-link-color);cursor:pointer;user-select:auto">https://livegrep.com/search/linux?q=__attribute__((unused))</a></p>
<p style="margin-top:0px;margin-bottom:var(--s-prose-spacing);clear:both"><br>
</p>
<p style="margin-top:0px;margin-bottom:var(--s-prose-spacing);clear:both">GCC, on the other hand, does not provide any warnings for these unused and unmarked variables like the integer<span> </span><code style="margin:0px;padding:2px 4px;font-family:var(--ff-mono);font-size:13px;background-color:var(--black-075);color:var(--black-800);border-radius:3px">flags</code><span> </span>in<span> </span><a href="https://elixir.bootlin.com/linux/latest/source/kernel/sched/idle.c#L427" style="margin:0px;text-decoration:underline;color:var(--theme-link-color);cursor:pointer;user-select:auto">kernel/sched/idle.c#427</a><span> </span>.</p>
<p style="margin:0px;clear:both"><br>
</p>
<p style="margin:0px;clear:both">Why?</p>
</div>
</div>
</div>
</body>
</html>