Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
660f11be
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看板
提交
660f11be
编写于
7月 31, 2009
作者:
B
Blue Swirl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix Sparse warnings: "Using plain integer as NULL pointer"
Signed-off-by:
N
Blue Swirl
<
blauwirbel@gmail.com
>
上级
2e29bd04
变更
20
显示空白变更内容
内联
并排
Showing
20 changed file
with
59 addition
and
58 deletion
+59
-58
audio/ossaudio.c
audio/ossaudio.c
+1
-1
audio/sdlaudio.c
audio/sdlaudio.c
+1
-1
curses.c
curses.c
+1
-1
curses_keys.h
curses_keys.h
+1
-1
elf_ops.h
elf_ops.h
+1
-1
exec.c
exec.c
+4
-3
feature_to_c.sh
feature_to_c.sh
+1
-1
hw/ide.c
hw/ide.c
+1
-1
hw/ppc_newworld.c
hw/ppc_newworld.c
+1
-1
hw/ppc_oldworld.c
hw/ppc_oldworld.c
+1
-1
hw/rtl8139.c
hw/rtl8139.c
+2
-2
hw/sysbus.c
hw/sysbus.c
+1
-1
keymaps.c
keymaps.c
+2
-2
monitor.c
monitor.c
+1
-1
qemu-io.c
qemu-io.c
+11
-11
qemu-nbd.c
qemu-nbd.c
+16
-16
sdl.c
sdl.c
+1
-1
sdl_keysym.h
sdl_keysym.h
+1
-1
sparc-dis.c
sparc-dis.c
+7
-7
usb-linux.c
usb-linux.c
+4
-4
未找到文件。
audio/ossaudio.c
浏览文件 @
660f11be
...
...
@@ -481,7 +481,7 @@ static int oss_init_out (HWVoiceOut *hw, struct audsettings *as)
oss
->
mmapped
=
0
;
if
(
conf
.
try_mmap
)
{
oss
->
pcm_buf
=
mmap
(
0
,
NULL
,
hw
->
samples
<<
hw
->
info
.
shift
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
...
...
audio/sdlaudio.c
浏览文件 @
660f11be
...
...
@@ -201,7 +201,7 @@ static int sdl_open (SDL_AudioSpec *req, SDL_AudioSpec *obt)
}
#ifndef _WIN32
pthread_sigmask
(
SIG_SETMASK
,
&
old
,
0
);
pthread_sigmask
(
SIG_SETMASK
,
&
old
,
NULL
);
#endif
return
status
;
}
...
...
curses.c
浏览文件 @
660f11be
...
...
@@ -158,7 +158,7 @@ static void curses_cursor_position(DisplayState *ds, int x, int y)
#include "curses_keys.h"
static
kbd_layout_t
*
kbd_layout
=
0
;
static
kbd_layout_t
*
kbd_layout
=
NULL
;
static
int
keycode2keysym
[
CURSES_KEYS
];
static
void
curses_refresh
(
DisplayState
*
ds
)
...
...
curses_keys.h
浏览文件 @
660f11be
...
...
@@ -479,5 +479,5 @@ static const name2keysym_t name2keysym[] = {
{
"F20"
,
0x11c
},
{
"Escape"
,
27
},
{
0
,
0
},
{
NULL
,
0
},
};
elf_ops.h
浏览文件 @
660f11be
...
...
@@ -82,7 +82,7 @@ static const char *glue(lookup_symbol, SZ)(struct syminfo *s, target_ulong orig_
key
.
st_value
=
orig_addr
;
sym
=
bsearch
(
&
key
,
syms
,
s
->
disas_num_syms
,
sizeof
(
*
syms
),
glue
(
symfind
,
SZ
));
if
(
sym
!=
0
)
{
if
(
sym
!=
NULL
)
{
return
s
->
disas_strtab
+
sym
->
st_name
;
}
...
...
exec.c
浏览文件 @
660f11be
...
...
@@ -316,7 +316,7 @@ static inline PageDesc *page_find_alloc(target_ulong index)
#if defined(CONFIG_USER_ONLY)
size_t
len
=
sizeof
(
PageDesc
)
*
L2_SIZE
;
/* Don't use qemu_malloc because it may recurse. */
p
=
mmap
(
0
,
len
,
PROT_READ
|
PROT_WRITE
,
p
=
mmap
(
NULL
,
len
,
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
|
MAP_ANONYMOUS
,
-
1
,
0
);
*
lp
=
p
;
if
(
h2g_valid
(
p
))
{
...
...
@@ -341,8 +341,9 @@ static inline PageDesc *page_find(target_ulong index)
return
NULL
;
p
=
*
lp
;
if
(
!
p
)
return
0
;
if
(
!
p
)
{
return
NULL
;
}
return
p
+
(
index
&
(
L2_SIZE
-
1
));
}
...
...
feature_to_c.sh
浏览文件 @
660f11be
...
...
@@ -72,5 +72,5 @@ for input; do
echo
" {
\"
$basename
\"
,
$arrayname
},"
>>
$output
done
echo
" {
0,
0 }"
>>
$output
echo
" {
(char *)0, (char *)
0 }"
>>
$output
echo
"};"
>>
$output
hw/ide.c
浏览文件 @
660f11be
...
...
@@ -4411,7 +4411,7 @@ PCMCIACardState *dscm1xxxx_init(BlockDriverState *bdrv)
md
->
card
.
cis
=
dscm1xxxx_cis
;
md
->
card
.
cis_len
=
sizeof
(
dscm1xxxx_cis
);
ide_init2
(
md
->
ide
,
bdrv
,
0
,
qemu_allocate_irqs
(
md_set_irq
,
md
,
1
)[
0
]);
ide_init2
(
md
->
ide
,
bdrv
,
NULL
,
qemu_allocate_irqs
(
md_set_irq
,
md
,
1
)[
0
]);
md
->
ide
->
is_cf
=
1
;
md
->
ide
->
mdata_size
=
METADATA_SIZE
;
md
->
ide
->
mdata_storage
=
(
uint8_t
*
)
qemu_mallocz
(
METADATA_SIZE
);
...
...
hw/ppc_newworld.c
浏览文件 @
660f11be
...
...
@@ -195,7 +195,7 @@ static void ppc_core99_init (ram_addr_t ram_size,
kernel_size
=
load_elf
(
kernel_filename
,
kernel_base
,
NULL
,
&
lowaddr
,
NULL
);
if
(
kernel_size
>
0
&&
lowaddr
!=
KERNEL_LOAD_ADDR
)
{
kernel_size
=
load_elf
(
kernel_filename
,
(
2
*
kernel_base
)
-
lowaddr
,
NULL
,
0
,
NULL
);
NULL
,
NULL
,
NULL
);
}
if
(
kernel_size
<
0
)
kernel_size
=
load_aout
(
kernel_filename
,
kernel_base
,
...
...
hw/ppc_oldworld.c
浏览文件 @
660f11be
...
...
@@ -227,7 +227,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
kernel_size
=
load_elf
(
kernel_filename
,
kernel_base
,
NULL
,
&
lowaddr
,
NULL
);
if
(
kernel_size
>
0
&&
lowaddr
!=
KERNEL_LOAD_ADDR
)
{
kernel_size
=
load_elf
(
kernel_filename
,
(
2
*
kernel_base
)
-
lowaddr
,
NULL
,
0
,
NULL
);
NULL
,
NULL
,
NULL
);
}
if
(
kernel_size
<
0
)
kernel_size
=
load_aout
(
kernel_filename
,
kernel_base
,
...
...
hw/rtl8139.c
浏览文件 @
660f11be
...
...
@@ -2090,12 +2090,12 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s)
#define ETH_MTU 1500
/* ip packet header */
ip_header
*
ip
=
0
;
ip_header
*
ip
=
NULL
;
int
hlen
=
0
;
uint8_t
ip_protocol
=
0
;
uint16_t
ip_data_len
=
0
;
uint8_t
*
eth_payload_data
=
0
;
uint8_t
*
eth_payload_data
=
NULL
;
size_t
eth_payload_len
=
0
;
int
proto
=
be16_to_cpu
(
*
(
uint16_t
*
)(
saved_buffer
+
12
));
...
...
hw/sysbus.c
浏览文件 @
660f11be
...
...
@@ -32,7 +32,7 @@ struct BusInfo system_bus_info = {
void
sysbus_connect_irq
(
SysBusDevice
*
dev
,
int
n
,
qemu_irq
irq
)
{
assert
(
n
>=
0
&&
n
<
dev
->
num_irq
);
dev
->
irqs
[
n
]
=
0
;
dev
->
irqs
[
n
]
=
NULL
;
if
(
dev
->
irqp
[
n
])
{
*
dev
->
irqp
[
n
]
=
irq
;
}
...
...
keymaps.c
浏览文件 @
660f11be
...
...
@@ -75,7 +75,7 @@ static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table,
if
(
!
(
filename
&&
(
f
=
fopen
(
filename
,
"r"
))))
{
fprintf
(
stderr
,
"Could not read keymap file: '%s'
\n
"
,
language
);
return
0
;
return
NULL
;
}
qemu_free
(
filename
);
for
(;;)
{
...
...
@@ -144,7 +144,7 @@ static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table,
void
*
init_keyboard_layout
(
const
name2keysym_t
*
table
,
const
char
*
language
)
{
return
parse_keyboard_layout
(
table
,
language
,
0
);
return
parse_keyboard_layout
(
table
,
language
,
NULL
);
}
...
...
monitor.c
浏览文件 @
660f11be
...
...
@@ -2272,7 +2272,7 @@ static int get_monitor_def(target_long *pval, const char *name)
static
void
next
(
void
)
{
if
(
pch
!=
'\0'
)
{
if
(
*
pch
!=
'\0'
)
{
pch
++
;
while
(
qemu_isspace
(
*
pch
))
pch
++
;
...
...
qemu-io.c
浏览文件 @
660f11be
...
...
@@ -1414,17 +1414,17 @@ int main(int argc, char **argv)
int
growable
=
0
;
const
char
*
sopt
=
"hVc:Crsnmg"
;
struct
option
lopt
[]
=
{
{
"help"
,
0
,
0
,
'h'
},
{
"version"
,
0
,
0
,
'V'
},
{
"offset"
,
1
,
0
,
'o'
},
{
"cmd"
,
1
,
0
,
'c'
},
{
"create"
,
0
,
0
,
'C'
},
{
"read-only"
,
0
,
0
,
'r'
},
{
"snapshot"
,
0
,
0
,
's'
},
{
"nocache"
,
0
,
0
,
'n'
},
{
"misalign"
,
0
,
0
,
'm'
},
{
"growable"
,
0
,
0
,
'g'
},
{
NULL
,
0
,
0
,
0
}
{
"help"
,
0
,
NULL
,
'h'
},
{
"version"
,
0
,
NULL
,
'V'
},
{
"offset"
,
1
,
NULL
,
'o'
},
{
"cmd"
,
1
,
NULL
,
'c'
},
{
"create"
,
0
,
NULL
,
'C'
},
{
"read-only"
,
0
,
NULL
,
'r'
},
{
"snapshot"
,
0
,
NULL
,
's'
},
{
"nocache"
,
0
,
NULL
,
'n'
},
{
"misalign"
,
0
,
NULL
,
'm'
},
{
"growable"
,
0
,
NULL
,
'g'
},
{
NULL
,
0
,
NULL
,
0
}
};
int
c
;
int
opt_index
=
0
;
...
...
qemu-nbd.c
浏览文件 @
660f11be
...
...
@@ -191,22 +191,22 @@ int main(int argc, char **argv)
char
sockpath
[
128
];
const
char
*
sopt
=
"hVb:o:p:rsnP:c:dvk:e:t"
;
struct
option
lopt
[]
=
{
{
"help"
,
0
,
0
,
'h'
},
{
"version"
,
0
,
0
,
'V'
},
{
"bind"
,
1
,
0
,
'b'
},
{
"port"
,
1
,
0
,
'p'
},
{
"socket"
,
1
,
0
,
'k'
},
{
"offset"
,
1
,
0
,
'o'
},
{
"read-only"
,
0
,
0
,
'r'
},
{
"partition"
,
1
,
0
,
'P'
},
{
"connect"
,
1
,
0
,
'c'
},
{
"disconnect"
,
0
,
0
,
'd'
},
{
"snapshot"
,
0
,
0
,
's'
},
{
"nocache"
,
0
,
0
,
'n'
},
{
"shared"
,
1
,
0
,
'e'
},
{
"persistent"
,
0
,
0
,
't'
},
{
"verbose"
,
0
,
0
,
'v'
},
{
NULL
,
0
,
0
,
0
}
{
"help"
,
0
,
NULL
,
'h'
},
{
"version"
,
0
,
NULL
,
'V'
},
{
"bind"
,
1
,
NULL
,
'b'
},
{
"port"
,
1
,
NULL
,
'p'
},
{
"socket"
,
1
,
NULL
,
'k'
},
{
"offset"
,
1
,
NULL
,
'o'
},
{
"read-only"
,
0
,
NULL
,
'r'
},
{
"partition"
,
1
,
NULL
,
'P'
},
{
"connect"
,
1
,
NULL
,
'c'
},
{
"disconnect"
,
0
,
NULL
,
'd'
},
{
"snapshot"
,
0
,
NULL
,
's'
},
{
"nocache"
,
0
,
NULL
,
'n'
},
{
"shared"
,
1
,
NULL
,
'e'
},
{
"persistent"
,
0
,
NULL
,
't'
},
{
"verbose"
,
0
,
NULL
,
'v'
},
{
NULL
,
0
,
NULL
,
0
}
};
int
ch
;
int
opt_ind
=
0
;
...
...
sdl.c
浏览文件 @
660f11be
...
...
@@ -53,7 +53,7 @@ static SDL_Cursor *sdl_cursor_hidden;
static
int
absolute_enabled
=
0
;
static
int
guest_cursor
=
0
;
static
int
guest_x
,
guest_y
;
static
SDL_Cursor
*
guest_sprite
=
0
;
static
SDL_Cursor
*
guest_sprite
=
NULL
;
static
uint8_t
allocator
;
static
SDL_PixelFormat
host_format
;
static
int
scaling_active
=
0
;
...
...
sdl_keysym.h
浏览文件 @
660f11be
...
...
@@ -273,5 +273,5 @@ static const name2keysym_t name2keysym[]={
{
"Pause"
,
SDLK_PAUSE
},
{
"Escape"
,
SDLK_ESCAPE
},
{
0
,
0
},
{
NULL
,
0
},
};
sparc-dis.c
浏览文件 @
660f11be
...
...
@@ -2115,7 +2115,7 @@ static const arg asi_table_v8[] =
{
0x40
,
"#ASI_M_VIKING_TMP1"
},
{
0x41
,
"#ASI_M_VIKING_TMP2"
},
{
0x4c
,
"#ASI_M_ACTION"
},
{
0
,
0
}
{
0
,
NULL
}
};
static
const
arg
asi_table_v9
[]
=
...
...
@@ -2155,7 +2155,7 @@ static const arg asi_table_v9[] =
/* These are UltraSPARC extensions. */
/* FIXME: There are dozens of them. Not sure we want them all.
Most are for kernel building but some are for vis type stuff. */
{
0
,
0
}
{
0
,
NULL
}
};
/* Return the name for ASI value VALUE or NULL if not found. */
...
...
@@ -2183,7 +2183,7 @@ static const arg membar_table[] =
{
0x04
,
"#LoadStore"
},
{
0x02
,
"#StoreLoad"
},
{
0x01
,
"#LoadLoad"
},
{
0
,
0
}
{
0
,
NULL
}
};
/* Return the name for membar value VALUE or NULL if not found. */
...
...
@@ -2204,7 +2204,7 @@ static const arg prefetch_table[] =
{
3
,
"#one_write"
},
{
4
,
"#page"
},
{
16
,
"#invalidate"
},
{
0
,
0
}
{
0
,
NULL
}
};
/* Return the name for prefetch value VALUE or NULL if not found. */
...
...
@@ -2226,7 +2226,7 @@ static const arg sparclet_cpreg_table[] =
{
4
,
"%ccsr2"
},
{
5
,
"%cccrr"
},
{
6
,
"%ccrstr"
},
{
0
,
0
}
{
0
,
NULL
}
};
/* Return the name for sparclet cpreg value VALUE or NULL if not found. */
...
...
@@ -2770,11 +2770,11 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
imm_added_to_rs1
=
1
;
if
(
X_RS1
(
insn
)
!=
X_RD
(
insn
)
&&
strchr
(
opcode
->
args
,
'r'
)
!=
0
)
&&
strchr
(
opcode
->
args
,
'r'
)
!=
NULL
)
/* Can't do simple format if source and dest are different. */
continue
;
if
(
X_RS2
(
insn
)
!=
X_RD
(
insn
)
&&
strchr
(
opcode
->
args
,
'O'
)
!=
0
)
&&
strchr
(
opcode
->
args
,
'O'
)
!=
NULL
)
/* Can't do simple format if source and dest are different. */
continue
;
...
...
usb-linux.c
浏览文件 @
660f11be
...
...
@@ -1057,7 +1057,7 @@ static int get_tag_value(char *buf, int buf_size,
*/
static
int
usb_host_scan_dev
(
void
*
opaque
,
USBScanFunc
*
func
)
{
FILE
*
f
=
0
;
FILE
*
f
=
NULL
;
char
line
[
1024
];
char
buf
[
1024
];
int
bus_num
,
addr
,
speed
,
device_count
,
class_id
,
product_id
,
vendor_id
;
...
...
@@ -1178,7 +1178,7 @@ static int usb_host_read_file(char *line, size_t line_size, const char *device_f
*/
static
int
usb_host_scan_sys
(
void
*
opaque
,
USBScanFunc
*
func
)
{
DIR
*
dir
=
0
;
DIR
*
dir
=
NULL
;
char
line
[
1024
];
int
bus_num
,
addr
,
speed
,
class_id
,
product_id
,
vendor_id
;
int
ret
=
0
;
...
...
@@ -1257,8 +1257,8 @@ static int usb_host_scan_sys(void *opaque, USBScanFunc *func)
static
int
usb_host_scan
(
void
*
opaque
,
USBScanFunc
*
func
)
{
Monitor
*
mon
=
cur_mon
;
FILE
*
f
=
0
;
DIR
*
dir
=
0
;
FILE
*
f
=
NULL
;
DIR
*
dir
=
NULL
;
int
ret
=
0
;
const
char
*
fs_type
[]
=
{
"unknown"
,
"proc"
,
"dev"
,
"sys"
};
char
devpath
[
PATH_MAX
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录