GCC version is 4.8.1
I was compiling Git master on my laptop for some testing and saw these
warnings:
*Note: I was only compiling the default module set (so there might be more
warnings in modules outside of that set).*
*mi_rpc.so (building libbinrpc.so.0.1)*
binrpc_api.c: In function ‘binrpc_response_to_text’:
binrpc_api.c:1044:82: warning: ‘val.u.strval.len’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
*buf_len += (TEXT_BUFF_ALLOC_CHUNK < req_len) ? TEXT_BUFF_ALLOC_CHUNK +
req_len : TEXT_BUFF_ALLOC_CHUNK;
^
binrpc_api.c:1154:20: note: ‘val.u.strval.len’ was declared here
struct binrpc_val val;
^
*pike.so*
pike_top.c: In function ‘pike_top_print_addr’:
pike_top.c:23:25: warning: argument to ‘sizeof’ in ‘memset’ call is the
same expression as the destination; did you mean to provide an explicit
length? [-Wsizeof-pointer-memaccess]
memset( buff, 0, sizeof(buff));
^
*sca.so*
sca_call_info.c: In function ‘sca_call_info_update’:
sca_call_info.h:51:9: warning: the comparison will always evaluate as
‘true’ for the address of ‘call_info’ will never be NULL [-Waddress]
((ci1) != NULL || \
^
sca_call_info.h:56:4: note: in expansion of macro ‘SCA_CALL_INFO_EMPTY’
(!SCA_CALL_INFO_EMPTY((ci1)) && \
^
sca_call_info.c:1977:7: note: in expansion of macro
‘SCA_CALL_INFO_IS_SHARED_CALLER’
if ( SCA_CALL_INFO_IS_SHARED_CALLER( &call_info ) &&
^
sca_call_info.h:51:9: warning: the comparison will always evaluate as
‘true’ for the address of ‘call_info’ will never be NULL [-Waddress]
((ci1) != NULL || \
^
sca_call_info.h:60:4: note: in expansion of macro ‘SCA_CALL_INFO_EMPTY’
(!SCA_CALL_INFO_EMPTY((ci1)) && \
^
sca_call_info.c:1984:14: note: in expansion of macro
‘SCA_CALL_INFO_IS_SHARED_CALLEE’
} else if ( SCA_CALL_INFO_IS_SHARED_CALLEE( &call_info ) &&
^
*seas.so*
event_dispatcher.c: In function ‘dispatcher_main_loop’:
event_dispatcher.c:271:27: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].fd=poll_fds[j+1].fd;
^
event_dispatcher.c:272:31: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].events=poll_fds[j+1].events;
^
event_dispatcher.c:273:32: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].revents=poll_fds[j+1].revents;
^
event_dispatcher.c:271:27: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].fd=poll_fds[j+1].fd;
^
event_dispatcher.c:271:12: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].fd=poll_fds[j+1].fd;
^
event_dispatcher.c:272:31: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].events=poll_fds[j+1].events;
^
event_dispatcher.c:272:12: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].events=poll_fds[j+1].events;
^
event_dispatcher.c:273:32: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].revents=poll_fds[j+1].revents;
^
event_dispatcher.c:273:12: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].revents=poll_fds[j+1].revents;
^
event_dispatcher.c:271:27: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].fd=poll_fds[j+1].fd;
^
event_dispatcher.c:271:12: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].fd=poll_fds[j+1].fd;
^
event_dispatcher.c:272:31: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].events=poll_fds[j+1].events;
^
event_dispatcher.c:272:12: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].events=poll_fds[j+1].events;
^
event_dispatcher.c:273:32: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].revents=poll_fds[j+1].revents;
^
event_dispatcher.c:273:12: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].revents=poll_fds[j+1].revents;
^
event_dispatcher.c:271:27: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].fd=poll_fds[j+1].fd;
^
event_dispatcher.c:271:12: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].fd=poll_fds[j+1].fd;
^
event_dispatcher.c:272:31: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].events=poll_fds[j+1].events;
^
event_dispatcher.c:272:12: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].events=poll_fds[j+1].events;
^
event_dispatcher.c:273:32: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].revents=poll_fds[j+1].revents;
^
event_dispatcher.c:273:12: warning: array subscript is above array bounds
[-Warray-bounds]
poll_fds[j].revents=poll_fds[j+1].revents;
^
*sms.so*
libsms_modem.c: In function ‘put_command’:
libsms_modem.c:77:7: warning: ignoring return value of ‘write’, declared
with attribute warn_unused_result [-Wunused-result]
write(mdm->fd,cmd,cmd_len);
^
Regards,
Peter
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#358 - equals $null and 0 return the same
User who did this - Víctor Seva (linuxmaniac)
----------
Maybe this is related to FS#141
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=358#comment1126
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Víctor Seva (linuxmaniac)
Attached to Project - sip-router
Summary - equals $null and 0 return the same
Task Type - Bug Report
Category - Core
Status - New
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - 4.0
Due in Version - Undecided
Due Date - Undecided
Details - <code>
request_route {
$avp(x)=0;
if($avp(x)==$null) {
xlog("L_INFO","$$avp(x)==$$null\n");
}
else {
xlog("L_INFO","$$avp(x)!=$$null\n");
}
if(is_avp_set("$avp(x)")) {
xlog("L_INFO","$$avp(x) is set\n");
}
else {
xlog("L_INFO","$$avp(x) is not set\n");
}
$avp(y)=$null;
if($avp(y)==0) {
xlog("L_INFO","$$avp(y)==0\n");
}
else {
xlog("L_INFO","$$avp(y)!=0\n");
}
if(is_avp_set("$avp(y)")) {
xlog("L_INFO","$$avp(y) is set\n");
}
else {
xlog("L_INFO","$$avp(y) is not set\n");
}
}
</code>
So $avp(x) is 0 and $avp(y) is not set
Output:
<code>
Oct 23 12:32:35 guest-945GCM-S2L kamailio[5991]: INFO: <script>: $avp(x)==$null
Oct 23 12:32:35 guest-945GCM-S2L kamailio[5991]: INFO: <script>: $avp(x) is set
Oct 23 12:32:35 guest-945GCM-S2L kamailio[5991]: INFO: <script>: $avp(y)==0
Oct 23 12:32:35 guest-945GCM-S2L kamailio[5991]: INFO: <script>: $avp(y) is not set
</code>
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=358
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Inserting/replacing/deleting elements does work.
When you do a GET xcap_server.c:w_xcaps_get() fetches the document from the
DB and always returns it whole (regardless of whether or not the XCAP URI
contained an XPath).
There is a function that looks like is meant to perform an element fetch
(xcap_misc.c:xcaps_xpath_get()) but it is not called by anything in
xcap_server. Further, comparing xcap_misc.c:xcaps_xpath_get() with
xcap_misc.c:xcaps_xpath_set() makes me thing the _get() function has never
been tested and won't work properly. Specifically, the indentation, memory
allocation, and pointer checking is a different between the functions so I
suspect the _set() function has had some bug fixes that the _get() function
has not.
Regards,
Peter
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd