[PATCH] compiler warning: unconstify arg passed to OCTET_STRING_noalloc()

Neels Hofmeyr nhofmeyr at sysmocom.de
Fri Apr 15 19:52:42 UTC 2016


On Thu, Apr 14, 2016 at 04:57:11PM +0200, Neels Hofmeyr wrote:
> So, I want to change this:
> 
> static inline void OCTET_STRING_noalloc(OCTET_STRING_t *s, const uint8_t *str, int size)
> {
>         s->buf = str;
>         s->size = size;
> }
> 
> because OCTET_STRING_t.s is not const, and must not be const, will never be const.

I meant OCTET_STRING_t.buf, of course.

~Neels

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20160415/9722d171/attachment.bin>


More information about the OpenBSC mailing list