Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
4bc36777
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4bc36777
编写于
7月 24, 2008
作者:
O
ohair
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6725543: Compiler warnings in serviceability native code
Reviewed-by: alanb
上级
51b76b36
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
47 addition
and
60 deletion
+47
-60
src/share/back/ThreadReferenceImpl.c
src/share/back/ThreadReferenceImpl.c
+0
-1
src/share/back/transport.c
src/share/back/transport.c
+1
-1
src/share/demo/jvmti/hprof/hprof_io.c
src/share/demo/jvmti/hprof/hprof_io.c
+0
-1
src/share/demo/jvmti/hprof/hprof_util.c
src/share/demo/jvmti/hprof/hprof_util.c
+1
-1
src/share/transport/shmem/shmemBack.c
src/share/transport/shmem/shmemBack.c
+5
-4
src/share/transport/shmem/shmemBase.c
src/share/transport/shmem/shmemBase.c
+1
-1
src/share/transport/socket/socketTransport.c
src/share/transport/socket/socketTransport.c
+10
-9
src/share/transport/socket/sysSocket.h
src/share/transport/socket/sysSocket.h
+4
-14
src/solaris/transport/socket/socket_md.c
src/solaris/transport/socket/socket_md.c
+10
-10
src/windows/transport/socket/socket_md.c
src/windows/transport/socket/socket_md.c
+12
-18
src/windows/transport/socket/socket_md.h
src/windows/transport/socket/socket_md.h
+3
-0
未找到文件。
src/share/back/ThreadReferenceImpl.c
浏览文件 @
4bc36777
...
...
@@ -540,7 +540,6 @@ ownedMonitorsWithStackDepth(PacketInputStream *in, PacketOutputStream *out)
jvmtiError
error
=
JVMTI_ERROR_NONE
;
jint
count
=
0
;
jint
depth
;
jvmtiMonitorStackDepthInfo
*
monitors
=
NULL
;
error
=
JVMTI_FUNC_PTR
(
gdata
->
jvmti
,
GetOwnedMonitorStackDepthInfo
)
...
...
src/share/back/transport.c
浏览文件 @
4bc36777
...
...
@@ -473,7 +473,7 @@ transport_startTransport(jboolean isServer, char *name, char *address,
/*
* Record listener address in a system property
*/
len
=
strlen
(
name
)
+
strlen
(
retAddress
)
+
2
;
/* ':' and '\0' */
len
=
(
int
)
strlen
(
name
)
+
(
int
)
strlen
(
retAddress
)
+
2
;
/* ':' and '\0' */
prop_value
=
(
char
*
)
jvmtiAllocate
(
len
);
strcpy
(
prop_value
,
name
);
strcat
(
prop_value
,
":"
);
...
...
src/share/demo/jvmti/hprof/hprof_io.c
浏览文件 @
4bc36777
...
...
@@ -1900,7 +1900,6 @@ static void
dump_heap_segment_and_reset
(
jlong
segment_size
)
{
int
fd
;
char
*
last_chunk
;
jlong
last_chunk_len
;
HPROF_ASSERT
(
gdata
->
heap_fd
>=
0
);
...
...
src/share/demo/jvmti/hprof/hprof_util.c
浏览文件 @
4bc36777
...
...
@@ -1174,7 +1174,7 @@ add_class_fields(JNIEnv *env, ClassIndex top_cnum, ClassIndex cnum,
finfo
=
empty_finfo
;
finfo
.
cnum
=
cnum
;
finfo
.
modifiers
=
getFieldModifiers
(
klass
,
idlist
[
i
]);
finfo
.
modifiers
=
(
unsigned
short
)
getFieldModifiers
(
klass
,
idlist
[
i
]);
if
(
(
finfo
.
modifiers
&
JVM_ACC_STATIC
)
==
0
||
!
skip_static_field_names
)
{
char
*
field_name
;
...
...
src/share/transport/shmem/shmemBack.c
浏览文件 @
4bc36777
...
...
@@ -96,7 +96,8 @@ setLastError(int err, char *newmsg) {
*/
if
(
err
==
JDWPTRANSPORT_ERROR_IO_ERROR
)
{
char
*
join_str
=
": "
;
int
msg_len
=
strlen
(
newmsg
)
+
strlen
(
join_str
)
+
strlen
(
buf
)
+
3
;
int
msg_len
=
(
int
)
strlen
(
newmsg
)
+
(
int
)
strlen
(
join_str
)
+
(
int
)
strlen
(
buf
)
+
3
;
msg
=
(
*
callbacks
->
alloc
)(
msg_len
);
if
(
msg
!=
NULL
)
{
strcpy
(
msg
,
newmsg
);
...
...
@@ -104,7 +105,7 @@ setLastError(int err, char *newmsg) {
strcat
(
msg
,
buf
);
}
}
else
{
msg
=
(
*
callbacks
->
alloc
)(
strlen
(
newmsg
)
+
1
);
msg
=
(
*
callbacks
->
alloc
)(
(
int
)
strlen
(
newmsg
)
+
1
);
if
(
msg
!=
NULL
)
{
strcpy
(
msg
,
newmsg
);
}
...
...
@@ -183,7 +184,7 @@ shmemStartListening(jdwpTransportEnv* env, const char *address, char **actualAdd
char
*
name2
;
rc
=
shmemBase_name
(
transport
,
&
name
);
if
(
rc
==
SYS_OK
)
{
name2
=
(
callbacks
->
alloc
)(
strlen
(
name
)
+
1
);
name2
=
(
callbacks
->
alloc
)(
(
int
)
strlen
(
name
)
+
1
);
if
(
name2
==
NULL
)
{
RETURN_ERROR
(
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY
,
"out of memory"
);
}
else
{
...
...
@@ -329,7 +330,7 @@ shmemGetLastError(jdwpTransportEnv* env, char **msgP)
if
(
msg
==
NULL
)
{
return
JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE
;
}
*
msgP
=
(
*
callbacks
->
alloc
)(
strlen
(
msg
)
+
1
);
*
msgP
=
(
*
callbacks
->
alloc
)(
(
int
)
strlen
(
msg
)
+
1
);
if
(
*
msgP
==
NULL
)
{
return
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY
;
}
...
...
src/share/transport/shmem/shmemBase.c
浏览文件 @
4bc36777
...
...
@@ -167,7 +167,7 @@ setLastErrorMsg(char *newmsg) {
msg
=
(
char
*
)
sysTlsGet
(
tlsIndex
);
if
(
msg
==
NULL
)
{
msg
=
(
*
callback
->
alloc
)(
strlen
(
newmsg
)
+
1
);
msg
=
(
*
callback
->
alloc
)(
(
int
)
strlen
(
newmsg
)
+
1
);
if
(
msg
!=
NULL
)
{
strcpy
(
msg
,
newmsg
);
}
...
...
src/share/transport/socket/socketTransport.c
浏览文件 @
4bc36777
...
...
@@ -85,7 +85,8 @@ setLastError(jdwpTransportError err, char *newmsg) {
if
(
err
==
JDWPTRANSPORT_ERROR_IO_ERROR
)
{
char
*
join_str
=
": "
;
int
msg_len
=
strlen
(
newmsg
)
+
strlen
(
join_str
)
+
strlen
(
buf
)
+
3
;
int
msg_len
=
(
int
)
strlen
(
newmsg
)
+
(
int
)
strlen
(
join_str
)
+
(
int
)
strlen
(
buf
)
+
3
;
msg
=
(
*
callback
->
alloc
)(
msg_len
);
if
(
msg
!=
NULL
)
{
strcpy
(
msg
,
newmsg
);
...
...
@@ -93,7 +94,7 @@ setLastError(jdwpTransportError err, char *newmsg) {
strcat
(
msg
,
buf
);
}
}
else
{
msg
=
(
*
callback
->
alloc
)(
strlen
(
newmsg
)
+
1
);
msg
=
(
*
callback
->
alloc
)(
(
int
)
strlen
(
newmsg
)
+
1
);
if
(
msg
!=
NULL
)
{
strcpy
(
msg
,
newmsg
);
}
...
...
@@ -153,7 +154,7 @@ handshake(int fd, jlong timeout) {
}
buf
=
b
;
buf
+=
received
;
n
=
dbgsysRecv
(
fd
,
buf
,
strlen
(
hello
)
-
received
,
0
);
n
=
dbgsysRecv
(
fd
,
buf
,
(
int
)
strlen
(
hello
)
-
received
,
0
);
if
(
n
==
0
)
{
setLastError
(
0
,
"handshake failed - connection prematurally closed"
);
return
JDWPTRANSPORT_ERROR_IO_ERROR
;
...
...
@@ -179,14 +180,14 @@ handshake(int fd, jlong timeout) {
}
}
if
(
dbgsysSend
(
fd
,
hello
,
strlen
(
hello
),
0
)
!=
(
int
)
strlen
(
hello
))
{
if
(
dbgsysSend
(
fd
,
hello
,
(
int
)
strlen
(
hello
),
0
)
!=
(
int
)
strlen
(
hello
))
{
RETURN_IO_ERROR
(
"send failed during handshake"
);
}
return
JDWPTRANSPORT_ERROR_NONE
;
}
static
jdwpTransportError
parseAddress
(
const
char
*
address
,
struct
sockaddr_in
*
sa
,
UINT32
defaultHost
)
{
parseAddress
(
const
char
*
address
,
struct
sockaddr_in
*
sa
,
uint32_t
defaultHost
)
{
char
*
colon
;
memset
((
void
*
)
sa
,
0
,
sizeof
(
struct
sockaddr_in
));
...
...
@@ -202,9 +203,9 @@ parseAddress(const char *address, struct sockaddr_in *sa, UINT32 defaultHost) {
char
*
buf
;
char
*
hostname
;
u_short
port
;
UINT32
addr
;
uint32_t
addr
;
buf
=
(
*
callback
->
alloc
)(
strlen
(
address
)
+
1
);
buf
=
(
*
callback
->
alloc
)(
(
int
)
strlen
(
address
)
+
1
);
if
(
buf
==
NULL
)
{
RETURN_ERROR
(
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY
,
"out of memory"
);
}
...
...
@@ -306,7 +307,7 @@ socketTransport_startListening(jdwpTransportEnv* env, const char* address,
(
struct
sockaddr
*
)
&
sa
,
&
len
);
portNum
=
dbgsysNetworkToHostShort
(
sa
.
sin_port
);
sprintf
(
buf
,
"%d"
,
portNum
);
*
actualAddress
=
(
*
callback
->
alloc
)(
strlen
(
buf
)
+
1
);
*
actualAddress
=
(
*
callback
->
alloc
)(
(
int
)
strlen
(
buf
)
+
1
);
if
(
*
actualAddress
==
NULL
)
{
RETURN_ERROR
(
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY
,
"out of memory"
);
}
else
{
...
...
@@ -679,7 +680,7 @@ socketTransport_getLastError(jdwpTransportEnv* env, char** msgP) {
if
(
msg
==
NULL
)
{
return
JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE
;
}
*
msgP
=
(
*
callback
->
alloc
)(
strlen
(
msg
)
+
1
);
*
msgP
=
(
*
callback
->
alloc
)(
(
int
)
strlen
(
msg
)
+
1
);
if
(
*
msgP
==
NULL
)
{
return
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY
;
}
...
...
src/share/transport/socket/sysSocket.h
浏览文件 @
4bc36777
...
...
@@ -29,14 +29,6 @@
#include "sys.h"
#include "socket_md.h"
#ifdef _LP64
typedef
unsigned
int
UINT32
;
typedef
int
INT32
;
#else
/* _LP64 */
typedef
unsigned
long
UINT32
;
typedef
long
INT32
;
#endif
/* _LP64 */
#define DBG_POLLIN 1
#define DBG_POLLOUT 2
...
...
@@ -44,7 +36,6 @@ typedef long INT32;
#define DBG_ETIMEOUT -200
int
dbgsysSocketClose
(
int
fd
);
INT32
dbgsysSocketAvailable
(
int
fd
,
INT32
*
pbytes
);
int
dbgsysConnect
(
int
fd
,
struct
sockaddr
*
him
,
int
len
);
int
dbgsysFinishConnect
(
int
fd
,
long
timeout
);
int
dbgsysAccept
(
int
fd
,
struct
sockaddr
*
him
,
int
*
len
);
...
...
@@ -52,18 +43,17 @@ int dbgsysSendTo(int fd, char *buf, int len, int flags, struct sockaddr *to,
int
tolen
);
int
dbgsysRecvFrom
(
int
fd
,
char
*
buf
,
int
nbytes
,
int
flags
,
struct
sockaddr
*
from
,
int
*
fromlen
);
int
dbgsysListen
(
int
fd
,
INT32
count
);
int
dbgsysListen
(
int
fd
,
int
backlog
);
int
dbgsysRecv
(
int
fd
,
char
*
buf
,
int
nBytes
,
int
flags
);
int
dbgsysSend
(
int
fd
,
char
*
buf
,
int
nBytes
,
int
flags
);
int
dbgsysTimeout
(
int
fd
,
INT32
timeout
);
struct
hostent
*
dbgsysGetHostByName
(
char
*
hostname
);
int
dbgsysSocket
(
int
domain
,
int
type
,
int
protocol
);
int
dbgsysBind
(
int
fd
,
struct
sockaddr
*
name
,
int
namelen
);
int
dbgsysSetSocketOption
(
int
fd
,
jint
cmd
,
jboolean
on
,
jvalue
value
);
UINT32
dbgsysInetAddr
(
const
char
*
cp
);
UINT32
dbgsysHostToNetworkLong
(
UINT32
hostlong
);
uint32_t
dbgsysInetAddr
(
const
char
*
cp
);
uint32_t
dbgsysHostToNetworkLong
(
uint32_t
hostlong
);
unsigned
short
dbgsysHostToNetworkShort
(
unsigned
short
hostshort
);
UINT32
dbgsysNetworkToHostLong
(
UINT32
netlong
);
uint32_t
dbgsysNetworkToHostLong
(
uint32_t
netlong
);
unsigned
short
dbgsysNetworkToHostShort
(
unsigned
short
netshort
);
int
dbgsysGetSocketName
(
int
fd
,
struct
sockaddr
*
him
,
int
*
len
);
int
dbgsysConfigureBlocking
(
int
fd
,
jboolean
blocking
);
...
...
src/solaris/transport/socket/socket_md.c
浏览文件 @
4bc36777
...
...
@@ -45,8 +45,8 @@
#include "sysSocket.h"
int
dbgsysListen
(
int
fd
,
INT32
count
)
{
return
listen
(
fd
,
count
);
dbgsysListen
(
int
fd
,
int
backlog
)
{
return
listen
(
fd
,
backlog
);
}
int
...
...
@@ -131,13 +131,13 @@ dbgsysBind(int fd, struct sockaddr *name, int namelen) {
return
bind
(
fd
,
name
,
namelen
);
}
UINT32
uint32_t
dbgsysInetAddr
(
const
char
*
cp
)
{
return
(
UINT32
)
inet_addr
(
cp
);
return
(
uint32_t
)
inet_addr
(
cp
);
}
UINT32
dbgsysHostToNetworkLong
(
UINT32
hostlong
)
{
uint32_t
dbgsysHostToNetworkLong
(
uint32_t
hostlong
)
{
return
htonl
(
hostlong
);
}
...
...
@@ -151,8 +151,8 @@ dbgsysGetSocketName(int fd, struct sockaddr *name, int *namelen) {
return
getsockname
(
fd
,
name
,
namelen
);
}
UINT32
dbgsysNetworkToHostLong
(
UINT32
netlong
)
{
uint32_t
dbgsysNetworkToHostLong
(
uint32_t
netlong
)
{
return
ntohl
(
netlong
);
}
...
...
@@ -163,10 +163,10 @@ dbgsysSetSocketOption(int fd, jint cmd, jboolean on, jvalue value)
if
(
cmd
==
TCP_NODELAY
)
{
struct
protoent
*
proto
=
getprotobyname
(
"TCP"
);
int
tcp_level
=
(
proto
==
0
?
IPPROTO_TCP
:
proto
->
p_proto
);
INT32
onl
=
(
INT32
)
on
;
uint32_t
onl
=
(
uint32_t
)
on
;
if
(
setsockopt
(
fd
,
tcp_level
,
TCP_NODELAY
,
(
char
*
)
&
onl
,
sizeof
(
INT32
))
<
0
)
{
(
char
*
)
&
onl
,
sizeof
(
uint32_t
))
<
0
)
{
return
SYS_ERR
;
}
}
else
if
(
cmd
==
SO_LINGER
)
{
...
...
src/windows/transport/socket/socket_md.c
浏览文件 @
4bc36777
...
...
@@ -120,8 +120,8 @@ DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
* function pointer table, but our pointer should still be good.
*/
int
dbgsysListen
(
int
fd
,
INT32
count
)
{
return
listen
(
fd
,
(
int
)
count
);
dbgsysListen
(
int
fd
,
int
backlog
)
{
return
listen
(
fd
,
backlog
);
}
int
...
...
@@ -172,7 +172,7 @@ int dbgsysFinishConnect(int fd, long timeout) {
int
dbgsysAccept
(
int
fd
,
struct
sockaddr
*
name
,
int
*
namelen
)
{
return
accept
(
fd
,
name
,
namelen
);
return
(
int
)
accept
(
fd
,
name
,
namelen
);
}
int
...
...
@@ -209,7 +209,7 @@ dbgsysHostToNetworkShort(unsigned short hostshort) {
int
dbgsysSocket
(
int
domain
,
int
type
,
int
protocol
)
{
int
fd
=
socket
(
domain
,
type
,
protocol
);
int
fd
=
(
int
)
socket
(
domain
,
type
,
protocol
);
if
(
fd
!=
SOCKET_ERROR
)
{
SetHandleInformation
((
HANDLE
)(
UINT_PTR
)
fd
,
HANDLE_FLAG_INHERIT
,
FALSE
);
}
...
...
@@ -229,12 +229,6 @@ dbgsysSocketClose(int fd) {
return
closesocket
(
fd
);
}
INT32
dbgsysSocketAvailable
(
int
fd
,
INT32
*
pbytes
)
{
u_long
arg
=
(
u_long
)
*
pbytes
;
return
(
INT32
)
ioctlsocket
(
fd
,
FIONREAD
,
&
arg
);
}
/* Additions to original follow */
int
...
...
@@ -243,14 +237,14 @@ dbgsysBind(int fd, struct sockaddr *name, int namelen) {
}
UINT32
uint32_t
dbgsysInetAddr
(
const
char
*
cp
)
{
return
(
UINT32
)
inet_addr
(
cp
);
return
(
uint32_t
)
inet_addr
(
cp
);
}
UINT32
dbgsysHostToNetworkLong
(
UINT32
hostlong
)
{
return
(
UINT32
)
htonl
((
u_long
)
hostlong
);
uint32_t
dbgsysHostToNetworkLong
(
uint32_t
hostlong
)
{
return
(
uint32_t
)
htonl
((
u_long
)
hostlong
);
}
unsigned
short
...
...
@@ -263,9 +257,9 @@ dbgsysGetSocketName(int fd, struct sockaddr *name, int *namelen) {
return
getsockname
(
fd
,
name
,
namelen
);
}
UINT32
dbgsysNetworkToHostLong
(
UINT32
netlong
)
{
return
(
UINT32
)
ntohl
((
u_long
)
netlong
);
uint32_t
dbgsysNetworkToHostLong
(
uint32_t
netlong
)
{
return
(
uint32_t
)
ntohl
((
u_long
)
netlong
);
}
/*
...
...
src/windows/transport/socket/socket_md.h
浏览文件 @
4bc36777
...
...
@@ -25,3 +25,6 @@
/* Use its data structures and constants; don't make direct calls */
#include <winsock2.h>
#define uint32_t UINT32
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录