[Asterisk-code-review] General: Avoid implicit conversion to char when changes valu... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Sat Jan 6 10:33:44 CST 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7852 )

Change subject: General: Avoid implicit conversion to char when changes value to negative.
......................................................................


Patch Set 1: Code-Review-1

> res_http_websocket.c:311:52: error: pointer targets in passing
 > argument 3 of ‘ast_careful_fwrite’ differ in signedness
 > [-Werror=pointer-sign]
 > 
 > This is actually a bug in ast_careful_fwrite(.) because it forces a
 > char* although it requires just a void*. No idea how to tackle this
 > for Asterisk 13 without going for a type cast. Any ideas?

I have no problem with changing ast_careful_fwrite() to take a void type
instead of a char type.  This is not C++ where that type of change would
change the mangled function name and thus the ABI.

My own opinion of the mixing signed/unsigned warnings is that they are more
trouble than they are worth.  Those warnings rarely find anything useful.
Even more so when dealing with chars because of the hoops you have to jump
through to get the stupid compiler to shut up.


-- 
To view, visit https://gerrit.asterisk.org/7852
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I7cceaa88e147cbdf81a3a7beec5c1c20210fa41e
Gerrit-Change-Number: 7852
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Sat, 06 Jan 2018 16:33:44 +0000
Gerrit-HasComments: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180106/26679cae/attachment.html>


More information about the asterisk-code-review mailing list