Re: [PATCH] config.c: fix potential number truncation in git_parse_signed()

2016-07-08 Thread Duy Nguyen
On Wed, Jul 6, 2016 at 9:33 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> clang -Wabsolute-value on IA-32 architecture complains that "absolute >> value function 'labs' given an argument of type 'intmax_t' (aka 'long >> long') but has parameter of type 'long' which may cause trun

Re: [PATCH] config.c: fix potential number truncation in git_parse_signed()

2016-07-06 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > clang -Wabsolute-value on IA-32 architecture complains that "absolute > value function 'labs' given an argument of type 'intmax_t' (aka 'long > long') but has parameter of type 'long' which may cause truncation of > value". Very unlikely for this code though. Never

[PATCH] config.c: fix potential number truncation in git_parse_signed()

2016-07-02 Thread Nguyễn Thái Ngọc Duy
clang -Wabsolute-value on IA-32 architecture complains that "absolute value function 'labs' given an argument of type 'intmax_t' (aka 'long long') but has parameter of type 'long' which may cause truncation of value". Very unlikely for this code though. Nevertheless, add an explicit check for trunc