Skip to content

Commit

Permalink
tcp/sctp: fixed a few warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rhornig committed Nov 18, 2019
1 parent aaa3ab1 commit 5aa6bfa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/inet/transportlayer/sctp/SCTPAssociationUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void SCTPAssociation::printSctpPathMap() const
const char *SCTPAssociation::stateName(const int32 state)
{
#define CASE(x) case x: \
s = #x + 7; break
s = (char *)#x + 7; break
const char *s = "unknown";
switch (state) {
CASE(SCTP_S_CLOSED);
Expand All @@ -160,7 +160,7 @@ const char *SCTPAssociation::stateName(const int32 state)
const char *SCTPAssociation::eventName(const int32 event)
{
#define CASE(x) case x: \
s = #x + 7; break
s = (char *)#x + 7; break
const char *s = "unknown";
switch (event) {
CASE(SCTP_E_OPEN_PASSIVE);
Expand Down Expand Up @@ -206,7 +206,7 @@ const char *SCTPAssociation::eventName(const int32 event)
const char *SCTPAssociation::indicationName(const int32 code)
{
#define CASE(x) case x: \
s = #x + 7; break
s = (char *)#x + 7; break
const char *s = "unknown";
switch (code) {
CASE(SCTP_I_DATA);
Expand Down
6 changes: 3 additions & 3 deletions src/inet/transportlayer/tcp/TCPConnectionUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace tcp {
const char *TCPConnection::stateName(int state)
{
#define CASE(x) case x: \
s = #x + 6; break
s = (char *)#x + 6; break
const char *s = "unknown";
switch (state) {
CASE(TCP_S_INIT);
Expand All @@ -68,7 +68,7 @@ const char *TCPConnection::stateName(int state)
const char *TCPConnection::eventName(int event)
{
#define CASE(x) case x: \
s = #x + 6; break
s = (char *)#x + 6; break
const char *s = "unknown";
switch (event) {
CASE(TCP_E_IGNORE);
Expand Down Expand Up @@ -98,7 +98,7 @@ const char *TCPConnection::eventName(int event)
const char *TCPConnection::indicationName(int code)
{
#define CASE(x) case x: \
s = #x + 6; break
s = (char *)#x + 6; break
const char *s = "unknown";
switch (code) {
CASE(TCP_I_DATA);
Expand Down
2 changes: 1 addition & 1 deletion src/inet/transportlayer/tcp_lwip/TcpLwipConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void TcpLwipConnection::sendEstablishedMsg()
const char *TcpLwipConnection::indicationName(int code)
{
#define CASE(x) case x: \
s = #x + 6; break
s = (char *)#x + 6; break
const char *s = "unknown";

switch (code) {
Expand Down

0 comments on commit 5aa6bfa

Please sign in to comment.