Created
September 7, 2014 11:53
-
-
Save tamanobi/751a4a2a64c5a5c2c0ad to your computer and use it in GitHub Desktop.
compile error(libwebsockets)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test.cpp:83:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] | |
#define LOCAL_RESOURCE_PATH INSTALL_DATADIR"/libwebsockets-test-server" | |
^ | |
test.cpp:84:23: note: in expansion of macro 'LOCAL_RESOURCE_PATH' | |
char *resource_path = LOCAL_RESOURCE_PATH; | |
^ | |
test.cpp: In function 'void dump_handshake_info(libwebsocket*)': | |
test.cpp:155:35: error: invalid conversion from 'int' to 'lws_token_indexes' [-fpermissive] | |
if (!lws_hdr_total_length(wsi, n)) | |
^ | |
In file included from test.cpp:45:0: | |
./lib/libwebsockets.h:1196:1: note: initializing argument 2 of 'int lws_hdr_total_length(libwebsocket*, lws_token_indexes)' | |
lws_hdr_total_length(struct libwebsocket *wsi, enum lws_token_indexes h); | |
^ | |
test.cpp:158:39: error: invalid conversion from 'int' to 'lws_token_indexes' [-fpermissive] | |
lws_hdr_copy(wsi, buf, sizeof buf, n); | |
^ | |
In file included from test.cpp:45:0: | |
./lib/libwebsockets.h:1199:1: note: initializing argument 4 of 'int lws_hdr_copy(libwebsocket*, char*, int, lws_token_indexes)' | |
lws_hdr_copy(struct libwebsocket *wsi, char *dest, int len, | |
^ | |
test.cpp: In function 'int callback_http(libwebsocket_context*, libwebsocket*, libwebsocket_callback_reasons, void*, void*, size_t)': | |
test.cpp:290:21: error: invalid conversion from 'void*' to 'const char*' [-fpermissive] | |
if (strcmp(in, "/")) { | |
^ | |
In file included from test.cpp:29:0: | |
/usr/include/string.h:77:6: note: initializing argument 1 of 'int strcmp(const char*, const char*)' | |
int strcmp(const char *, const char *); | |
^ | |
test.cpp:293:56: error: invalid conversion from 'void*' to 'const char*' [-fpermissive] | |
strncat(buf, in, sizeof(buf) - strlen(resource_path)); | |
^ | |
In file included from test.cpp:29:0: | |
/usr/include/string.h:83:7: note: initializing argument 2 of 'char* strncat(char*, const char*, size_t)' | |
char *strncat(char *, const char *, size_t); | |
^ | |
test.cpp:338:22: error: invalid conversion from 'void*' to 'const char*' [-fpermissive] | |
strncpy(buf, in, 20); | |
^ | |
In file included from test.cpp:29:0: | |
/usr/include/string.h:85:7: note: initializing argument 2 of 'char* strncpy(char*, const char*, size_t)' | |
char *strncpy(char *, const char *, size_t); | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment