Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys



On Oct 16,  6:32pm, uwe%stderr.spb.ru@localhost (Valery Ushakov) wrote:
-- Subject: Re: CVS commit: src/sys

| On Wed, Oct 16, 2019 at 11:27:39 -0400, Christos Zoulas wrote:
| 
| > Module Name:	src
| > Committed By:	christos
| > Date:		Wed Oct 16 15:27:39 UTC 2019
| > 
| > Modified Files:
| > 	src/sys/kern: kern_core.c kern_hook.c kern_sig.c kern_veriexec.c
| > 	    subr_ipi.c subr_pool.c subr_vmem.c sys_ptrace_common.c
| > 	src/sys/net: if_ethersubr.c
| > 
| > Log Message:
| > Add void * function pointer casts. There are different ways to "fix" those
| > warnings:
| >     1. this one: add a void * cast (which I think is the least intrusive)
| >     2. add pragmas to elide the warning
| >     3. add intermediate inline conversion functions
| >     4. change the called function prototypes, adding unused arguments and
| >        converting some of the pointer arguments to void *.
| >     5. make the functions varyadic (which defeats the purpose of checking)
| >     6. pass command line flags to elide the warning
| > I did try 3 and 4 and I was not pleased with the result (sys_ptrace_common.c)
| > (3) added too much code and defines, and (4) made the regular use clumsy.
| 
| Can we maybe mark these (and others you did recently) with a macro
| akin to UNCONST, so that they can be found out later?
| 
|     FCOERCE(int (*)(void *, void *), foo)
| 
| or something?

Sure,

__FUNCAST()?
__FPTRCAST()?

christos


Home | Main Index | Thread Index | Old Index