[dpdk-dev] [PATCH v3] test-pmd: Fix pointer aliasing error
Thomas Monjalon
thomas.monjalon at 6wind.com
Fri Dec 5 10:24:40 CET 2014
2014-12-05 05:34, Qiu, Michael:
> Any comments about this version? a new workaround solution :)
Yes, one comment: I think it's ugly :)
These aliasing errors are not reliable so I think we can disable it (like
Linux does).
But in case you don't want to disable the warning, please add a comment to your
workaround to explain it is caused by GCC strict-aliasing check.
> > - const uint16_t *u16 = (const uint16_t *)buf;
> > + uintptr_t ptr = (uintptr_t)buf;
> > + const uint16_t *u16 = (const uint16_t *)ptr;
Thanks
--
Thomas
More information about the dev
mailing list