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
447bf4ad
Commit
447bf4ad
authored
Aug 08, 2016
by
Deomid Ryabkov
Committed by
Cesanta Bot
Aug 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile examples with -Werror
PUBLISHED_FROM=5a24bda9029db3fc7bf04dc871656d65d551f4ab
parent
6572c1c6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
examples.mk
examples/examples.mk
+1
-1
publish_subscribe.c
examples/publish_subscribe/publish_subscribe.c
+3
-2
mongoose.c
mongoose.c
+2
-1
No files found.
examples/examples.mk
View file @
447bf4ad
SOURCES = $(PROG).c ../../mongoose.c
SOURCES = $(PROG).c ../../mongoose.c
CFLAGS = -g -W -Wall -I../.. -Wno-unused-function $(CFLAGS_EXTRA) $(MODULE_CFLAGS)
CFLAGS = -g -W -Wall -
Werror -
I../.. -Wno-unused-function $(CFLAGS_EXTRA) $(MODULE_CFLAGS)
all: $(PROG)
all: $(PROG)
...
...
examples/publish_subscribe/publish_subscribe.c
View file @
447bf4ad
...
@@ -20,9 +20,10 @@
...
@@ -20,9 +20,10 @@
static
void
*
stdin_thread
(
void
*
param
)
{
static
void
*
stdin_thread
(
void
*
param
)
{
int
ch
,
sock
=
*
(
int
*
)
param
;
int
ch
,
sock
=
*
(
int
*
)
param
;
// Forward all types characters to the socketpair
while
((
ch
=
getchar
())
!=
EOF
)
{
while
((
ch
=
getchar
())
!=
EOF
)
{
unsigned
char
c
=
(
unsigned
char
)
ch
;
unsigned
char
c
=
(
unsigned
char
)
ch
;
send
(
sock
,
&
c
,
1
,
0
);
// Forward all types characters to the socketpair
send
(
sock
,
(
const
char
*
)
&
c
,
1
,
0
);
}
}
return
NULL
;
return
NULL
;
}
}
...
@@ -75,7 +76,7 @@ int main(int argc, char *argv[]) {
...
@@ -75,7 +76,7 @@ int main(int argc, char *argv[]) {
fprintf
(
stderr
,
"Usage: %s <port> <client|server>
\n
"
,
argv
[
0
]);
fprintf
(
stderr
,
"Usage: %s <port> <client|server>
\n
"
,
argv
[
0
]);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
else
if
(
strcmp
(
argv
[
2
],
"client"
)
==
0
)
{
}
else
if
(
strcmp
(
argv
[
2
],
"client"
)
==
0
)
{
in
t
fds
[
2
];
sock_
t
fds
[
2
];
struct
mg_connection
*
ioconn
,
*
server_conn
;
struct
mg_connection
*
ioconn
,
*
server_conn
;
mg_mgr_init
(
&
mgr
,
NULL
);
mg_mgr_init
(
&
mgr
,
NULL
);
...
...
mongoose.c
View file @
447bf4ad
...
@@ -6567,6 +6567,7 @@ static pid_t mg_start_process(const char *interp, const char *cmd,
...
@@ -6567,6 +6567,7 @@ static pid_t mg_start_process(const char *interp, const char *cmd,
/* CloseHandle(pi.hThread); */
/* CloseHandle(pi.hThread); */
/* CloseHandle(pi.hProcess); */
/* CloseHandle(pi.hProcess); */
(
void
)
envp
;
return
pi
.
hProcess
;
return
pi
.
hProcess
;
}
}
#else
#else
...
@@ -8676,7 +8677,7 @@ static int mg_get_ip_address_of_nameserver(char *name, size_t name_len) {
...
@@ -8676,7 +8677,7 @@ static int mg_get_ip_address_of_nameserver(char *name, size_t name_len) {
*
key
=
"SYSTEM
\\
ControlSet001
\\
Services
\\
Tcpip
\\
Parameters
\\
Interfaces"
;
*
key
=
"SYSTEM
\\
ControlSet001
\\
Services
\\
Tcpip
\\
Parameters
\\
Interfaces"
;
if
((
err
=
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
key
,
&
hKey
))
!=
ERROR_SUCCESS
)
{
if
((
err
=
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
key
,
&
hKey
))
!=
ERROR_SUCCESS
)
{
fprintf
(
stderr
,
"cannot open reg key %s: %d
\n
"
,
key
,
err
);
fprintf
(
stderr
,
"cannot open reg key %s: %
l
d
\n
"
,
key
,
err
);
ret
=
-
1
;
ret
=
-
1
;
}
else
{
}
else
{
for
(
ret
=
-
1
,
i
=
0
;
for
(
ret
=
-
1
,
i
=
0
;
...
...
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