summaryrefslogtreecommitdiff
path: root/toxcore/TCP_server.c
diff options
context:
space:
mode:
authorDavid Zero <zero@cpp.edu>2016-12-02 04:37:23 -0800
committerDavid Zero <zero@cpp.edu>2017-01-04 13:44:39 -0800
commitf3469070fe899e8e4fd88665386a55bad9f77cd8 (patch)
treec24743d266d3a8593792ef3e8661006cb283368a /toxcore/TCP_server.c
parent535b8238fd191710e1e8864f302fba5a02f52b1d (diff)
Portability fixes
- CFLAG gnu99 was changed to c99. - CXXFLAG c++98 was changed to c++11. - CFLAG -pedantic-errors was added so that non-ISO C now throws errors. - _XOPEN_SOURCE feature test macro added and set to 600 to expose SUSv3 and c99 definitions in modules that required them. - Fixed tests (and bootstrap daemon logging) that were failing due to the altered build flags. - Avoid string suffix misinterpretation; explicit narrowing conversion. - Misc. additions to .gitignore to make sure build artifacts don't wind up in version control.
Diffstat (limited to 'toxcore/TCP_server.c')
-rw-r--r--toxcore/TCP_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c
index 0e2d0085..d9ace28a 100644
--- a/toxcore/TCP_server.c
+++ b/toxcore/TCP_server.c
@@ -619,7 +619,7 @@ static int send_routing_response(TCP_Secure_Connection *con, uint8_t rpid, const
619 */ 619 */
620static int send_connect_notification(TCP_Secure_Connection *con, uint8_t id) 620static int send_connect_notification(TCP_Secure_Connection *con, uint8_t id)
621{ 621{
622 uint8_t data[2] = {TCP_PACKET_CONNECTION_NOTIFICATION, id + NUM_RESERVED_PORTS}; 622 uint8_t data[2] = {TCP_PACKET_CONNECTION_NOTIFICATION, (uint8_t)(id + NUM_RESERVED_PORTS)};
623 return write_packet_TCP_secure_connection(con, data, sizeof(data), 1); 623 return write_packet_TCP_secure_connection(con, data, sizeof(data), 1);
624} 624}
625 625
@@ -629,7 +629,7 @@ static int send_connect_notification(TCP_Secure_Connection *con, uint8_t id)
629 */ 629 */
630static int send_disconnect_notification(TCP_Secure_Connection *con, uint8_t id) 630static int send_disconnect_notification(TCP_Secure_Connection *con, uint8_t id)
631{ 631{
632 uint8_t data[2] = {TCP_PACKET_DISCONNECT_NOTIFICATION, id + NUM_RESERVED_PORTS}; 632 uint8_t data[2] = {TCP_PACKET_DISCONNECT_NOTIFICATION, (uint8_t)(id + NUM_RESERVED_PORTS)};
633 return write_packet_TCP_secure_connection(con, data, sizeof(data), 1); 633 return write_packet_TCP_secure_connection(con, data, sizeof(data), 1);
634} 634}
635 635