Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
747bbdf7
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
747bbdf7
编写于
10月 18, 2009
作者:
B
Blue Swirl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Suppress warnings about 'warn_unused_result' attribute directive
Signed-off-by:
N
Blue Swirl
<
blauwirbel@gmail.com
>
上级
78cfb07f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
1 deletion
+26
-1
configure
configure
+20
-0
hw/qdev.h
hw/qdev.h
+1
-1
qemu-common.h
qemu-common.h
+5
-0
未找到文件。
configure
浏览文件 @
747bbdf7
...
@@ -1666,6 +1666,23 @@ if compile_prog "" "" ; then
...
@@ -1666,6 +1666,23 @@ if compile_prog "" "" ; then
need_offsetof
=
no
need_offsetof
=
no
fi
fi
##########################################
# check if the compiler understands attribute warn_unused_result
#
# This could be smarter, but gcc -Werror does not error out even when warning
# about attribute warn_unused_result
gcc_attribute_warn_unused_result
=
no
cat
>
$TMPC
<<
EOF
#if defined(__GNUC__) && (__GNUC__ < 4) && defined(__GNUC_MINOR__) && (__GNUC__ < 4)
#error gcc 3.3 or older
#endif
int main(void) { return 0;}
EOF
if
compile_prog
""
""
;
then
gcc_attribute_warn_unused_result
=
yes
fi
##########################################
##########################################
# check if we have fdatasync
# check if we have fdatasync
...
@@ -1994,6 +2011,9 @@ fi
...
@@ -1994,6 +2011,9 @@ fi
if
test
"
$need_offsetof
"
=
"yes"
;
then
if
test
"
$need_offsetof
"
=
"yes"
;
then
echo
"CONFIG_NEED_OFFSETOF=y"
>>
$config_host_mak
echo
"CONFIG_NEED_OFFSETOF=y"
>>
$config_host_mak
fi
fi
if
test
"
$gcc_attribute_warn_unused_result
"
=
"yes"
;
then
echo
"CONFIG_GCC_ATTRIBUTE_WARN_UNUSED_RESULT=y"
>>
$config_host_mak
fi
if
test
"
$fdatasync
"
=
"yes"
;
then
if
test
"
$fdatasync
"
=
"yes"
;
then
echo
"CONFIG_FDATASYNC=y"
>>
$config_host_mak
echo
"CONFIG_FDATASYNC=y"
>>
$config_host_mak
fi
fi
...
...
hw/qdev.h
浏览文件 @
747bbdf7
...
@@ -100,7 +100,7 @@ struct CompatProperty {
...
@@ -100,7 +100,7 @@ struct CompatProperty {
DeviceState
*
qdev_create
(
BusState
*
bus
,
const
char
*
name
);
DeviceState
*
qdev_create
(
BusState
*
bus
,
const
char
*
name
);
DeviceState
*
qdev_device_add
(
QemuOpts
*
opts
);
DeviceState
*
qdev_device_add
(
QemuOpts
*
opts
);
int
qdev_init
(
DeviceState
*
dev
)
__attribute__
((
warn_unused_result
))
;
int
qdev_init
(
DeviceState
*
dev
)
QEMU_WARN_UNUSED_RESULT
;
void
qdev_init_nofail
(
DeviceState
*
dev
);
void
qdev_init_nofail
(
DeviceState
*
dev
);
int
qdev_unplug
(
DeviceState
*
dev
);
int
qdev_unplug
(
DeviceState
*
dev
);
void
qdev_free
(
DeviceState
*
dev
);
void
qdev_free
(
DeviceState
*
dev
);
...
...
qemu-common.h
浏览文件 @
747bbdf7
...
@@ -3,6 +3,11 @@
...
@@ -3,6 +3,11 @@
#define QEMU_COMMON_H
#define QEMU_COMMON_H
#define QEMU_NORETURN __attribute__ ((__noreturn__))
#define QEMU_NORETURN __attribute__ ((__noreturn__))
#ifdef CONFIG_GCC_ATTRIBUTE_WARN_UNUSED_RESULT
#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
#define QEMU_WARN_UNUSED_RESULT
#endif
/* Hack around the mess dyngen-exec.h causes: We need QEMU_NORETURN in files that
/* Hack around the mess dyngen-exec.h causes: We need QEMU_NORETURN in files that
cannot include the following headers without conflicts. This condition has
cannot include the following headers without conflicts. This condition has
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录