Skip to content

Commit

Permalink
Ignore wformat errors on GCC + MinGW platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
weinrank committed Jun 28, 2019
1 parent 1ceeca9 commit 111e0ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions programs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ endif ()
if (MSYS)
message(STATUS "MSYS")
add_definitions(-D__USE_MINGW_ANSI_STDIO)

if (CMAKE_C_COMPILER_ID MATCHES "GNU")
message(STATUS "MYSYS + GCC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format")
endif ()
endif ()


Expand Down
4 changes: 2 additions & 2 deletions usrsctplib/user_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -3292,14 +3292,14 @@ void sctp_userspace_ip6_output(int *result, struct mbuf *o_pak,
if ((!use_udp_tunneling) && (SCTP_BASE_VAR(userspace_rawsctp6) != -1)) {
if (WSASendTo(SCTP_BASE_VAR(userspace_rawsctp6), (LPWSABUF) send_iovec, iovcnt, &win_sent_len, win_msg_hdr.dwFlags, win_msg_hdr.name, (int) win_msg_hdr.namelen, NULL, NULL) != 0) {
*result = WSAGetLastError();
} else if ((int) win_sent_len != send_len) {
} else if ((int)win_sent_len != send_len) {
*result = WSAGetLastError();
}
}
if ((use_udp_tunneling) && (SCTP_BASE_VAR(userspace_udpsctp6) != -1)) {
if (WSASendTo(SCTP_BASE_VAR(userspace_udpsctp6), (LPWSABUF) send_iovec, iovcnt, &win_sent_len, win_msg_hdr.dwFlags, win_msg_hdr.name, (int) win_msg_hdr.namelen, NULL, NULL) != 0) {
*result = WSAGetLastError();
} else if ((int) win_sent_len != send_len) {
} else if ((int)win_sent_len != send_len) {
*result = WSAGetLastError();
}
}
Expand Down

0 comments on commit 111e0ca

Please sign in to comment.