{"id":1313,"date":"2023-02-01T12:41:48","date_gmt":"2023-02-01T12:41:48","guid":{"rendered":"https:\/\/ibex.tech\/c\/?p=1313"},"modified":"2023-02-02T16:49:55","modified_gmt":"2023-02-02T16:49:55","slug":"unused-warnings-and-errors","status":"publish","type":"post","link":"https:\/\/ibex.tech\/c\/compilers\/gcc-compiler\/errors\/unused-warnings-and-errors","title":{"rendered":"&#8220;Unused&#8221; Warnings and Errors"},"content":{"rendered":"\n<p>GCC compiler flags that control unused warnings include:<\/p>\n\n\n\n<p>-Wunused-function<br>-Wunused-label<br>-Wunused-parameter<br>-Wunused-value<br>-Wunused-variable<br>-Wunused (=all of the above)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Disable for a single file or section of code<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/Deal with \"error: label defined but not used &#91;-Werror=unused-label]\" from compiler\n\/\/#pragma GCC diagnostic push\n\/\/#pragma GCC diagnostic ignored \"-Wunused-label\"\n\n\t\/\/My code...\n\n\/\/#pragma GCC diagnostic pop<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>GCC compiler flags that control unused warnings include: -Wunused-function-Wunused-label-Wunused-parameter-Wunused-value-Wunused-variable-Wunused (=all of the above) Disable for a single file or section of code<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110],"tags":[],"class_list":["post-1313","post","type-post","status-publish","format-standard","hentry","category-errors"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/comments?post=1313"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1313\/revisions"}],"predecessor-version":[{"id":1318,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1313\/revisions\/1318"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/media?parent=1313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/categories?post=1313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/tags?post=1313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}