[prev in list] [next in list] [prev in thread] [next in thread] 

List:       exim-users
Subject:    Re: [exim] Testing 4.95-RC0 questions and warnings
From:       Jeremy Harris via Exim-users <exim-users () exim ! org>
Date:       2021-07-22 10:36:23
Message-ID: 3f809e87-c2d5-d31e-89af-94d93c3ca525 () wizmail ! org
[Download RAW message or body]

On 20/07/2021 19:57, Thomas Noll via Exim-users wrote:
> Am Montag, 19. Juli 2021, 16:05:39 CEST schrieb Jeremy Harris via Exim-users:
> 
>> Yup, known, and only appeared there as a result of pushing constification
>> further through the code.  The data items should be readonly, and that
>> has always been the case.
> 
> But here
> filter.c:2042:12: warning: assignment discards 'const' qualifier from pointer
> target type [-Wdiscarded-qualifiers]
> 
> ---
> fmsg = expargs[0];                /*XXX loses track of const */
>        if (Ustrlen(fmsg) > 1024) Ustrcpy(fmsg + 1000, US" ... (truncated)");
>        fmsg = US string_printing(fmsg);
> ----
> 
> a const value is modified. One could copy the value, but at first sight i'd
> rather drop the const here.

Ouch.  To do that you'd have to trace back the const to everywhere
and re-evaluate the semantic assumptions.  I suspect that's not viable,
and a copy really has to be done.

>   
>> Volunteers welcome (as I keep saying).
> 
> Tempting. But i dislike diffs caused by formatting, and i dislike
> manual formatting. So do you have a common formatting tool/config?

No; and (unfortunately) bits of the code having been developed by
different people have different styles.  I do regularise where I can
but it's a long struggle.

If you have a preferred tool, use src/exim.c as a template for
developing a config (and add the config to the codebase somewhere!)
-- 
Cheers,
   Jeremy

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic