Commit 769ee045 authored by Andrew Price's avatar Andrew Price
Browse files

Add -Wtype-limits

And fix some issues it complains about. Also tweak one issue found by
adding -Wmissing-field-initializers temporarily (that warning is too
fussy to enable by default).
parent a56ce40d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ WARNINGS = \
	-Wformat=2 \
	-Wformat-security \
	-Wformat-nonliteral \
	-Wtype-limits \
	-Wno-long-long \
	-Wno-strict-aliasing \

+1 −1
Original line number Diff line number Diff line
@@ -83,5 +83,5 @@ CommandList table[]={
{"wiz",        0x002, 1, "Usage: wiz <message>", "Send message to all wizchat users", c_wiz, 1},
{"wizchat",    0x002, 1, "Usage: wizchat on|off", "Toggle wizchat", c_wizchat, 1},
{"write",      0x000, 0, "Usage: write", "Post a message to the current folder", c_write, 1},
{NULL,         0x000, 0, NULL, NULL, 0}
{NULL,         0x000, 0, NULL, NULL, NULL, 0}
};
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ extern struct user * const user;

void inform_of_mail(char *to)
{
	if (ipc_send_to_username(to, IPC_NEWMAIL, NULL) < 0)
	if (ipc_send_to_username(to, IPC_NEWMAIL, NULL) != 0)
		printf(_("Cannot inform %s of new mail.\n"),to);
}

+0 −8
Original line number Diff line number Diff line
@@ -260,14 +260,6 @@ void t_runaway(CommandList *cm, int argc, const char **argv, char *args)
					return;
				}
			}
			else
			{
				if (num < 0)
				{
					printf("Invalid Runaway. Must be positive (0 disables)\n");
					return;
				}
			}
			run_away = num;
			if (run_away == 0) printf("Runaway disabled\n");
			else printf("Runaway set to value: %lu\n", run_away);