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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

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