id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
2989	Fix code which depends on signed overflow in C (which isn't defined in C)	vda		"

The warnings are:

src/vfs/smbfs/helpers/lib/time.c:177:16: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
src/vfs/smbfs/helpers/lib/time.c:181:16: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]

and they seems to be valid, and gcc people do intend to make gcc play tricks under ""signed overflow is undefined, so we can assume it never happens"" banner.

The patch was sent by email with subject line
""Fix code which depends on signed overflow in C (which isn't defined in C)"".
For your easy reference, it is just:

{{{
             /* no entry will cover more than 6 months */
-            low = t - MAX_DST_WIDTH / 2;
-            if (t < low)
+            if (t > TIME_T_MIN + MAX_DST_WIDTH / 2)
+                low = t - MAX_DST_WIDTH / 2;
+            else
                 low = TIME_T_MIN;

-            high = t + MAX_DST_WIDTH / 2;
-            if (high < t)
+            if (t < TIME_T_MAX - MAX_DST_WIDTH / 2)
+                high = t + MAX_DST_WIDTH / 2;
+            else
                 high = TIME_T_MAX;
}}}"	defect	closed	major		mc-vfs	master	wontfix					no branch	
