在gcc手册中找到了有关的解释:
unused:This attribute, attached to a function, means that the function is meant to be
        possibly unused. GCC will not produce a warning for this function.
===============================================================================
used: This attribute, attached to a function, means that code must be emitted for the
       function even if it appears that the function is not referenced. This is useful,
       for example, when the function is referenced only in inline assembly.

表示该函数或变量可能不使用,这个属性可以避免编译器产生警告信息。

__attribute__((unused))的更多相关文章

  1. 有关gcc的扩展__attribute__((unused))

    ================================ Author: taoyuetao Email: tao_yuetao@yahoo.com.cn Blog: taoyuetao.cu ...

  2. c++之__attribute__((unused))

    转自https://blog.csdn.net/u013083059/article/details/19342935 内核时注意到有些函数会有添加__attribute__((unused)), 在 ...

  3. 练习使用 __attribute__ 属性(仿照内核)

    上一篇文章分析了内核中各种 initcall 的调用过程,在这个基础上大概掌握了内核中使用的这种方法,于是参考内核及网友的文章自己动手写了下,记录在这个随笔中. 源代码如下: #include < ...

  4. __attribute__的一些相关属性

    __attribute__((format()))  这个format有3个参数. int my(NSString *str,NSString *str1,NSArray*str2,...) __at ...

  5. 利用gcc的__attribute__编译属性section子项构建初始化函数表【转】

    转自:https://my.oschina.net/u/180497/blog/177206 gcc的__attribute__编译属性有很多子项,用于改变作用对象的特性.这里讨论section子项的 ...

  6. 利用__attribute__((section()))构建初始化函数表【转】

    转自: https://mp.weixin.qq.com/s?__biz=MzAwMDUwNDgxOA==&mid=2652663356&idx=1&sn=7797629530 ...

  7. unused function warning message

    這篇的對象是 static function, static function 若沒有其它 function 去存取的話, 在 compile 時,會發生 unused error, 可以在 func ...

  8. unused function warning message(转)

    這篇的對象是 static function,static function 若沒有其它 function 去存取的話,在 compile 時,會發生 unused error,可以在 functio ...

  9. u-boot源码分析之C语言段

    题外话: 最近一直在学习u-boot的源代码,从代码量到代码风格,都让我认识到什么才是真正的程序.以往我所学到的C语言知识和u-boot的源代码相比,实在不值一提.说到底,机器都是0和1控制的.感觉这 ...

随机推荐

  1. Hadoop 1.1.2 Eclipse 插件使用——异常解决

    permission denied user 1.修改配置文件在conf/hdfs-site.xml文件中添加如下内容: <property> <name>dfs.permis ...

  2. xml velocity模板

    . <?xml version="1.0" encoding="GBK"?> <PACKET type="REQUEST" ...

  3. LightOJ 13361336 - Sigma Function (找规律 + 唯一分解定理)

    http://lightoj.com/volume_showproblem.php?problem=1336 Sigma Function Time Limit:2000MS     Memory L ...

  4. git会议分享

    git add . git add -A git add common.scss   只迁入某个文件 git pull h5 远程的:分支    这样就成功拉取一个新分支了 git push h5(远 ...

  5. HDU 4284Travel(状压DP)

    HDU 4284    Travel 有N个城市,M条边和H个这个人(PP)必须要去的城市,在每个城市里他都必须要“打工”,打工需要花费Di,可以挣到Ci,每条边有一个花费,现在求PP可不可以从起点1 ...

  6. 深入理解CRITICAL_SECTION

    临界区是一种防止多个线程同时执行一个特定代码节的机制,这一主题并没有引起太多关注,因而人们未能对其深刻理解.在需要跟踪代码中的多线程处理的性能时,对 Windows 中临界区的深刻理解非常有用.本文深 ...

  7. RS232串口用事件接受数据(一问一答)

    private void button1_Click(object sender, EventArgs e) { serialPort1.Open(); serialPort1.DataReceive ...

  8. lighttpd fastcgi的搭建

    公司很久以前有个task需要在板子上搭建个webserver以响应局域网内手机的请求. 以前是用lighttpd plugin实现的,后来仔细想想用fast cgi来弄也可以. 在install li ...

  9. chrome浏览器下用jQuery的load函数来跨域加载页面,响应状态status为(canceled)是什么情况? JSON和JSONP,也许你会豁然开朗,含jQuery用例

    http://www.cnblogs.com/dowinning/archive/2012/04/19/json-jsonp-jquery.html 问题来源:http://q.cnblogs.com ...

  10. 常见错误:Apple Mach-O Linker Error

    常见错误描述: Apple Mach-O Linker Error这类错误的错误信息最后一行通常如下: Command /Developer/Platforms/iPhoneOS.platform/D ...