Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
fe1ca16e
Commit
fe1ca16e
authored
Mar 17, 2011
by
Christian Beier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix (most) MinGW32 compiler warnings.
parent
56234cd0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
29 deletions
+33
-29
rotate.c
examples/rotate.c
+15
-15
rotatetemplate.c
examples/rotatetemplate.c
+5
-5
vncev.c
examples/vncev.c
+2
-1
listen.c
libvncclient/listen.c
+1
-0
rfbproto.c
libvncclient/rfbproto.c
+2
-0
ultra.c
libvncclient/ultra.c
+3
-3
zrle.c
libvncclient/zrle.c
+1
-1
rfbserver.c
libvncserver/rfbserver.c
+2
-2
ultra.c
libvncserver/ultra.c
+2
-2
No files found.
examples/rotate.c
View file @
fe1ca16e
...
...
@@ -10,22 +10,22 @@
#define FUNCNAME rfbRotate
#define FUNC(i, j) (h - 1 - j + i * h)
#define SWAPDIMENSIONS
#define OUT 8
#define OUT
BITS
8
#include "rotatetemplate.c"
#define OUT 16
#define OUT
BITS
16
#include "rotatetemplate.c"
#define OUT 32
#define OUT
BITS
32
#include "rotatetemplate.c"
#undef FUNCNAME
#undef FUNC
#define FUNCNAME rfbRotateCounterClockwise
#define FUNC(i, j) (j + (w - 1 - i) * h)
#define OUT 8
#define OUT
BITS
8
#include "rotatetemplate.c"
#define OUT 16
#define OUT
BITS
16
#include "rotatetemplate.c"
#define OUT 32
#define OUT
BITS
32
#include "rotatetemplate.c"
#undef FUNCNAME
#undef FUNC
...
...
@@ -33,33 +33,33 @@
#define FUNCNAME rfbFlipHorizontally
#define FUNC(i, j) ((w - 1 - i) + j * w)
#define OUT 8
#define OUT
BITS
8
#include "rotatetemplate.c"
#define OUT 16
#define OUT
BITS
16
#include "rotatetemplate.c"
#define OUT 32
#define OUT
BITS
32
#include "rotatetemplate.c"
#undef FUNCNAME
#undef FUNC
#define FUNCNAME rfbFlipVertically
#define FUNC(i, j) (i + (h - 1 - j) * w)
#define OUT 8
#define OUT
BITS
8
#include "rotatetemplate.c"
#define OUT 16
#define OUT
BITS
16
#include "rotatetemplate.c"
#define OUT 32
#define OUT
BITS
32
#include "rotatetemplate.c"
#undef FUNCNAME
#undef FUNC
#define FUNCNAME rfbRotateHundredAndEighty
#define FUNC(i, j) ((w - 1 - i) + (h - 1 - j) * w)
#define OUT 8
#define OUT
BITS
8
#include "rotatetemplate.c"
#define OUT 16
#define OUT
BITS
16
#include "rotatetemplate.c"
#define OUT 32
#define OUT
BITS
32
#include "rotatetemplate.c"
#undef FUNCNAME
#undef FUNC
...
...
examples/rotatetemplate.c
View file @
fe1ca16e
#define OUT_T CONCAT3E(uint,OUT,_t)
#define FUNCTION CONCAT2E(FUNCNAME,OUT)
#define OUT_T CONCAT3E(uint,OUT
BITS
,_t)
#define FUNCTION CONCAT2E(FUNCNAME,OUT
BITS
)
static
void
FUNCTION
(
rfbScreenInfoPtr
screen
)
{
...
...
@@ -16,7 +16,7 @@ static void FUNCTION(rfbScreenInfoPtr screen)
#ifdef SWAPDIMENSIONS
screen
->
width
=
h
;
screen
->
paddedWidthInBytes
=
h
*
OUT
/
8
;
screen
->
paddedWidthInBytes
=
h
*
OUT
BITS
/
8
;
screen
->
height
=
w
;
{
...
...
@@ -31,7 +31,7 @@ static void FUNCTION(rfbScreenInfoPtr screen)
rfbMarkRectAsModified
(
screen
,
0
,
0
,
screen
->
width
,
screen
->
height
);
}
#if OUT == 32
#if OUT
BITS
== 32
void
FUNCNAME
(
rfbScreenInfoPtr
screen
)
{
if
(
screen
->
serverFormat
.
bitsPerPixel
==
32
)
CONCAT2E
(
FUNCNAME
,
32
)(
screen
);
...
...
@@ -48,5 +48,5 @@ void FUNCNAME(rfbScreenInfoPtr screen) {
#endif
#undef FUNCTION
#undef OUT
#undef OUT
BITS
examples/vncev.c
View file @
fe1ca16e
...
...
@@ -99,7 +99,8 @@ static enum rfbNewClientAction newclient(rfbClientPtr cl)
{
char
buffer
[
1024
];
struct
sockaddr_in
addr
;
unsigned
int
len
=
sizeof
(
addr
),
ip
;
socklen_t
len
=
sizeof
(
addr
);
unsigned
int
ip
;
getpeername
(
cl
->
sock
,(
struct
sockaddr
*
)
&
addr
,
&
len
);
ip
=
ntohl
(
addr
.
sin_addr
.
s_addr
);
...
...
libvncclient/listen.c
View file @
fe1ca16e
...
...
@@ -29,6 +29,7 @@
#ifdef __MINGW32__
#define close closesocket
#include <winsock2.h>
#undef max
#else
#include <sys/wait.h>
#include <sys/utsname.h>
...
...
libvncclient/rfbproto.c
View file @
fe1ca16e
...
...
@@ -1045,7 +1045,9 @@ InitialiseRFBConnection(rfbClient* client)
rfbProtocolVersionMsg
pv
;
int
major
,
minor
;
uint32_t
authScheme
;
#ifdef LIBVNCSERVER_WITH_CLIENT_TLS
uint32_t
subAuthScheme
;
#endif
rfbClientInitMsg
ci
;
/* if the connection is immediately closed, don't report anything, so
...
...
libvncclient/ultra.c
View file @
fe1ca16e
...
...
@@ -37,7 +37,7 @@ HandleUltraBPP (rfbClient* client, int rx, int ry, int rw, int rh)
rfbZlibHeader
hdr
;
int
toRead
=
0
;
int
inflateResult
=
0
;
int
uncompressedBytes
=
((
rw
*
rh
)
*
(
BPP
/
8
));
lzo_u
int
uncompressedBytes
=
((
rw
*
rh
)
*
(
BPP
/
8
));
if
(
!
ReadFromRFBServer
(
client
,
(
char
*
)
&
hdr
,
sz_rfbZlibHeader
))
return
FALSE
;
...
...
@@ -119,7 +119,7 @@ HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh)
int
toRead
=
0
;
int
inflateResult
=
0
;
unsigned
char
*
ptr
=
NULL
;
int
uncompressedBytes
=
ry
+
(
rw
*
65535
);
lzo_u
int
uncompressedBytes
=
ry
+
(
rw
*
65535
);
unsigned
int
numCacheRects
=
rx
;
if
(
!
ReadFromRFBServer
(
client
,
(
char
*
)
&
hdr
,
sz_rfbZlibHeader
))
...
...
@@ -170,7 +170,7 @@ HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh)
uncompressedBytes
=
client
->
raw_buffer_size
;
inflateResult
=
lzo1x_decompress
(
(
lzo_byte
*
)
client
->
ultra_buffer
,
toRead
,
(
lzo_byte
*
)
client
->
raw_buffer
,
(
lzo_uintp
)
&
uncompressedBytes
,
NULL
);
(
lzo_byte
*
)
client
->
raw_buffer
,
&
uncompressedBytes
,
NULL
);
if
(
inflateResult
!=
LZO_E_OK
)
{
rfbClientLog
(
"ultra decompress returned error: %d
\n
"
,
...
...
libvncclient/zrle.c
View file @
fe1ca16e
...
...
@@ -363,7 +363,7 @@ static int HandleZRLETile(rfbClient* client,
{
return
-
8
;
}
else
if
(
(
type
>=
130
)
&&
(
type
<=
255
)
)
/* palette RLE */
else
if
(
type
>=
130
)
/* palette RLE */
{
CARDBPP
palette
[
128
];
int
i
,
j
;
...
...
libvncserver/rfbserver.c
View file @
fe1ca16e
...
...
@@ -1657,7 +1657,7 @@ rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t con
#ifdef LIBVNCSERVER_HAVE_LIBZ
/* compressed packet */
nRet
=
uncompress
(
compBuff
,
&
nRawBytes
,(
const
unsigned
char
*
)
buffer
,
length
);
retval
=
write
(
cl
->
fileTransfer
.
fd
,
compBuff
,
nRawBytes
);
retval
=
write
(
cl
->
fileTransfer
.
fd
,
(
char
*
)
compBuff
,
nRawBytes
);
#else
/* Write the file out as received... */
retval
=
write
(
cl
->
fileTransfer
.
fd
,
buffer
,
length
);
...
...
@@ -3265,7 +3265,7 @@ void
rfbNewUDPConnection
(
rfbScreenInfoPtr
rfbScreen
,
int
sock
)
{
if
(
write
(
sock
,
&
ptrAcceleration
,
1
)
<
0
)
{
if
(
write
(
sock
,
(
char
*
)
&
ptrAcceleration
,
1
)
<
0
)
{
rfbLogPerror
(
"rfbNewUDPConnection: write"
);
}
}
...
...
libvncserver/ultra.c
View file @
fe1ca16e
...
...
@@ -50,7 +50,7 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl,
+
(
x
*
(
cl
->
scaledScreen
->
bitsPerPixel
/
8
)));
int
maxRawSize
;
int
maxCompSize
;
lzo_u
int
maxCompSize
;
maxRawSize
=
(
w
*
h
*
(
cl
->
format
.
bitsPerPixel
/
8
));
...
...
@@ -92,7 +92,7 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl,
}
/* Perform the compression here. */
deflateResult
=
lzo1x_1_compress
((
unsigned
char
*
)
cl
->
beforeEncBuf
,
(
lzo_uint
)(
w
*
h
*
(
cl
->
format
.
bitsPerPixel
/
8
)),
(
unsigned
char
*
)
cl
->
afterEncBuf
,
(
lzo_uint
*
)
&
maxCompSize
,
cl
->
lzoWrkMem
);
deflateResult
=
lzo1x_1_compress
((
unsigned
char
*
)
cl
->
beforeEncBuf
,
(
lzo_uint
)(
w
*
h
*
(
cl
->
format
.
bitsPerPixel
/
8
)),
(
unsigned
char
*
)
cl
->
afterEncBuf
,
&
maxCompSize
,
cl
->
lzoWrkMem
);
/* maxCompSize now contains the compressed size */
/* Find the total size of the resulting compressed data. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment