On 29.05.2020 16:15, Tobias Nygren wrote:
> On Fri, 29 May 2020 16:08:30 +0200
> Joerg Sonnenberger <jo...@bec.de> wrote:
> 
>> On Fri, May 29, 2020 at 10:53:02AM +0000, Kamil Rytarowski wrote:
>>> Module Name:        src
>>> Committed By:       kamil
>>> Date:               Fri May 29 10:53:02 UTC 2020
>>>
>>> Modified Files:
>>>     src/external/bsd/ntp/bin/ntpd: Makefile
>>>
>>> Log Message:
>>> Fix the ntpd build with Clang/LLVM
>>>
>>> Set -Wno-format-nonliteral for ntp_refclock.c
>>
>> Please fix this properly by adding the appropiate format string
>> annotation.
> 
> I have these in my local tree. Can't reach cvs.
> Feel free to commit them if appropriate.
> 

I will do it once the CVS server will be back.

> Index: external/bsd/ntp/dist/libntp/timexsup.c
> ===================================================================
> RCS file: /cvsroot/src/external/bsd/ntp/dist/libntp/timexsup.c,v
> retrieving revision 1.2
> diff -p -u -r1.2 timexsup.c
> --- external/bsd/ntp/dist/libntp/timexsup.c   25 May 2020 20:47:24 -0000      
> 1.2
> +++ external/bsd/ntp/dist/libntp/timexsup.c   29 May 2020 14:13:35 -0000
> @@ -30,8 +30,8 @@ clamp_rounded(
>       dval = floor(dval + 0.5);
>  
>       /* clamp / saturate */
> -     if (dval >= LONG_MAX)
> -             return LONG_MAX;
> +     if (dval >= (double)LONG_MAX)
> +             return (double)LONG_MAX;
>       if (dval <= LONG_MIN)
>               return LONG_MIN;
>       return (long)dval;
> Index: external/bsd/ntp/dist/ntpd/ntp_refclock.c
> ===================================================================
> RCS file: /cvsroot/src/external/bsd/ntp/dist/ntpd/ntp_refclock.c,v
> retrieving revision 1.13
> diff -p -u -r1.13 ntp_refclock.c
> --- external/bsd/ntp/dist/ntpd/ntp_refclock.c 25 May 2020 20:47:25 -0000      
> 1.13
> +++ external/bsd/ntp/dist/ntpd/ntp_refclock.c 29 May 2020 14:13:37 -0000
> @@ -1737,7 +1737,7 @@ refclock_save_lcode(
>  }
>  
>  /* format data into a_lastcode */
> -void
> +void __printflike(2, 0)
>  refclock_vformat_lcode(
>       struct refclockproc *   pp,
>       char const *            fmt,
> @@ -1757,7 +1757,7 @@ refclock_vformat_lcode(
>       /* !note! the NUL byte is needed in case vsnprintf() really fails */
>  }
>  
> -void
> +void __printflike(2, 0)
>  refclock_format_lcode(
>       struct refclockproc *   pp,
>       char const *            fmt,
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to