[asterisk-bugs] [JIRA] (ASTERISK-25592) chan_unistim: Clang Warning: variable sized type not at end of a struct
Alexander Traud (JIRA)
noreply at issues.asterisk.org
Fri Jan 22 04:41:33 CST 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-25592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229115#comment-229115 ]
Alexander Traud commented on ASTERISK-25592:
--------------------------------------------
Sorry, I do not understand what is required by me. Please, explain in greater detail. My current guess:
On 5th January, I was declared as ‘Assignee’ and the status was changed to ‘Waiting for Feedback’. As stated before, I have no knowledge, what this code does. Therefore, I cannot comment on the correctness of that patch. I am able to confirm that the warning on the console does not happen, after applying that patch.
On the contrary, I cannot say anything about the quality of that patch. {{channels/chan_unistim:get_to_address(…)}} creates and uses this struct. This struct is used to extract data from the wire. Therefore, I do not understand:
* How is it possible just to change the order within the struct?
Or stated differently: After looking at [a code example from StackOverflow|http://stackoverflow.com/questions/3062205],
* Isn’t {{in_addr address}} part of {{cmsghdr->cmsg_data}}?
* If it is, why is {{cmsghdr}} not accessed via its {{CMSG_*(…)}} to extract that IP address?
> chan_unistim: Clang Warning: variable sized type not at end of a struct
> -----------------------------------------------------------------------
>
> Key: ASTERISK-25592
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25592
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_unistim
> Affects Versions: 13.6.0
> Environment: Clang 3.3
> Reporter: Alexander Traud
> Assignee: Igor Goncharovsky
> Severity: Minor
> Attachments: unistim.clang.patch
>
>
> {{chan_unistim.c:1003:18: warning: field 'cm' with variable sized type 'struct cmsghdr' not at the end of a struct}}
> This happened on Ubuntu 14.04 LTS:
> {{sudo apt-get -y install build-essential libssl-dev libncurses-dev libnewt-dev libxml2-dev libsqlite3-dev uuid-dev libjansson-dev libblocksruntime-dev git iwyu}}
> {{cd /usr/src/}}
> {{git clone http://gerrit.asterisk.org/asterisk}}
> {{cd asterisk/}}
> {{CC=clang CXX=clang++ ./configure}}
> {{make}}
> The affected source code was introduced with [Mantis-8864|http://bugs.digium.com/view.php?id=8864]. I have no idea what this code does and how it works. Therefore, I cannot provide a patch.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list