include/linux/compiler-gcc4.h 
#define __must_check            __attribute__((warn_unused_result))

__must_check函数是指调用函数一定要处理该函数的返回值,否则编译器会给出警告。

定义一个必须检查返回值得函数:

int pop(_Type& data) __must_check {

....

}

int __must_check pop(_Type& data) {

....

}

 

相关文章:

  • 2021-09-28
  • 2021-08-11
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2021-11-09
猜你喜欢
  • 2022-12-23
  • 2022-01-12
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2021-12-25
相关资源
相似解决方案