modules/core/m_server.c: misc cleanup for compiler warnings

core/m_server.c:138:3: warning: 'break' will never be executed
                       [-Wunreachable-code-break]

    (... and 3 more of the same)

Why put an unreachable comment in the code *and then write a
statement following it* ? O_o
This commit is contained in:
Aaron Jones 2017-07-31 04:50:30 +00:00
parent 81e245be5b
commit efc60d52a3
No known key found for this signature in database
GPG key ID: 8AF0737488AB3012

View file

@ -134,8 +134,6 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
exit_client(client_p, client_p, client_p, "Invalid servername."); exit_client(client_p, client_p, client_p, "Invalid servername.");
return 0; return 0;
/* NOT REACHED */
break;
case -2: case -2:
sendto_realops_snomask(SNO_GENERAL, is_remote_connect(client_p) ? L_NETWIDE : L_ALL, sendto_realops_snomask(SNO_GENERAL, is_remote_connect(client_p) ? L_NETWIDE : L_ALL,
@ -149,8 +147,6 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
exit_client(client_p, client_p, client_p, "Invalid credentials."); exit_client(client_p, client_p, client_p, "Invalid credentials.");
return 0; return 0;
/* NOT REACHED */
break;
case -3: case -3:
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
@ -164,8 +160,6 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
exit_client(client_p, client_p, client_p, "Invalid host."); exit_client(client_p, client_p, client_p, "Invalid host.");
return 0; return 0;
/* NOT REACHED */
break;
/* servername is > HOSTLEN */ /* servername is > HOSTLEN */
case -4: case -4:
@ -177,8 +171,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
exit_client(client_p, client_p, client_p, "Invalid servername."); exit_client(client_p, client_p, client_p, "Invalid servername.");
return 0; return 0;
/* NOT REACHED */
break;
case -5: case -5:
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Connection from servername %s requires SSL/TLS but is plaintext", "Connection from servername %s requires SSL/TLS but is plaintext",
@ -188,6 +181,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
exit_client(client_p, client_p, client_p, "Access denied, requires SSL/TLS but is plaintext"); exit_client(client_p, client_p, client_p, "Access denied, requires SSL/TLS but is plaintext");
return 0; return 0;
case -6: case -6:
if (client_p->certfp) if (client_p->certfp)
{ {
@ -209,6 +203,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
} }
return 0; return 0;
default: default:
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Connection from servername %s rejected, unknown error %d", "Connection from servername %s rejected, unknown error %d",