原文:a.c:5:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wun

PTA做題時出現的錯誤,用if括起來就沒有了。 if scanf d , amp a 其實並不是這里有問題,如果你的輸出有問題,他就會雞蛋里挑骨頭的先顯示這個錯誤。 ...

2018-04-15 10:44 0 2179 推薦指數:

查看詳情

c++之__attribute__((unused))

轉自https://blog.csdn.net/u013083059/article/details/19342935 內核時注意到有些函數會有添加__attribute__((unused)), 在gcc手冊中找到了有關的解釋: unused ...

Sat Apr 21 19:37:00 CST 2018 0 1067
unused function warning message

這篇的對象是 static function, static function 若沒有其它 function 去存取的話, 在 compile 時,會發生 unused error, 可以在 function 前加上 attribute((unused)) 避免出現 unused error ...

Fri May 04 01:09:00 CST 2018 0 1606
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM