libosmo-sccp[master]: fix compiler warning: xua_test: hexdump pointer type

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/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sun Jun 25 18:36:30 UTC 2017


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/3030/1/tests/xua/xua_test.c
File tests/xua/xua_test.c:

Line 158: 	printf("    %s\n", osmo_hexdump_nospc((void*)gt_in, sizeof(struct osmo_sccp_gt)));
> It should be casted to const unsigned char *:
"void*" works just as well, it is accepted without a warning. It is, right? Have you seen a compiler complain?

It's not like the content of gt_in is *really* an unsigned char, we just choose to interpret it so. All we pass to hexdump is a memory location and a length, so it kinda makes sense to use void* and its implicit cast. If you still disagree I'll change it.


-- 
To view, visit https://gerrit.osmocom.org/3030
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab5529f6919fd22902a8b39e8a52079f08deb851
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list