Re: [PATCH 3/9] Add memory pool library

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

 



Hi Ram,

Ramkumar Ramachandra wrote:

> By marking all the generated functions MAYBE_UNUSED, we're
> actually suppressing more warnings than intended. Maybe we can avoid
> it and somehow find a way to mark only those functions that are really
> unused?

If we used templates instead of macros, a smart compiler would notice
which functions are _never_ used.  But sticking to C, I think it is
fine to rely on humans checking by hand for now.  (FWIW no obj_pool
functions are unused at the moment.)

I tried leaving out the MAYBE_UNUSED for foo_init() before I realized
that calling it is optional.

> Perhaps an extra parameter in obj_pool_gen?

Filling out such a list for each caller sounds to me like more trouble
than it’s worth.

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]