Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
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
esp
mongoose
Commits
fd839f18
Commit
fd839f18
authored
8 years ago
by
Artem Bulavin
Committed by
Cesanta Bot
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pointer to int casting warning
PUBLISHED_FROM=6bf2a710edaae6133d68eaf900ede14bba75ad5a
parent
f149f4aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
mongoose.c
mongoose.c
+2
-2
mongoose.h
mongoose.h
+3
-0
No files found.
mongoose.c
View file @
fd839f18
...
...
@@ -1509,7 +1509,7 @@ int c_vsnprintf(char *buf, size_t buf_size, const char *fmt, va_list ap) {
i
+=
c_itoa
(
buf
+
i
,
buf_size
-
i
,
va_arg
(
ap
,
size_t
),
ch
==
'x'
?
16
:
10
,
flags
,
field_width
);
}
else
if
(
ch
==
'p'
)
{
unsigned
long
num
=
(
unsigned
long
)
va_arg
(
ap
,
void
*
);
unsigned
long
num
=
(
unsigned
long
)
(
uintptr_t
)
va_arg
(
ap
,
void
*
);
C_SNPRINTF_APPEND_CHAR
(
'0'
);
C_SNPRINTF_APPEND_CHAR
(
'x'
);
i
+=
c_itoa
(
buf
+
i
,
buf_size
-
i
,
num
,
16
,
flags
,
0
);
...
...
@@ -5151,7 +5151,7 @@ void mg_send_websocket_handshake2(struct mg_connection *nc, const char *path,
const
char
*
host
,
const
char
*
protocol
,
const
char
*
extra_headers
)
{
/* pretty poor source of randomness, TODO fix */
unsigned
long
random
=
(
unsigned
long
)
path
;
unsigned
long
random
=
(
unsigned
long
)
(
uintptr_t
)
path
;
char
key
[
sizeof
(
random
)
*
3
];
mg_base64_encode
((
unsigned
char
*
)
&
random
,
sizeof
(
random
),
key
);
...
...
This diff is collapsed.
Click to expand it.
mongoose.h
View file @
fd839f18
...
...
@@ -186,6 +186,9 @@
#else
#define fseeko(x, y, z) fseek((x), (y), (z))
#endif
#if defined(_MSC_VER) && _MSC_VER <= 1200
typedef
unsigned
long
uintptr_t
;
#endif
typedef
int
socklen_t
;
#if _MSC_VER >= 1700
#include <stdint.h>
...
...
This diff is collapsed.
Click to expand it.
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