mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
compilation failed with -Werror=maybe-uninitialized
The compilation failed for devmode
--enable DONT_OPTIMIZE
--enable BETTER_BACKTRACES
--enable DO_CRASH
--enable TEST_FRAMEWORK
res_pjsip/pjsip_configuration.c: In function dtls_handler:
res_pjsip/pjsip_configuration.c:974:20: error:
back may be used uninitialized in this function [-Werror=maybe-uninitialized]
int size = strlen(front);
^
cc1: all warnings being treated as errors
Change-Id: I7f082ead0312792a577ec7c73015ba64dabca580
This commit is contained in:
@@ -963,7 +963,9 @@ static int dtls_handler(const struct aco_option *opt,
|
||||
{
|
||||
struct ast_sip_endpoint *endpoint = obj;
|
||||
char *name = ast_strdupa(var->name);
|
||||
char *front, *back, *buf = name;
|
||||
char *front = NULL;
|
||||
char *back = NULL;
|
||||
char *buf = name;
|
||||
|
||||
/* strip out underscores in the name */
|
||||
front = strtok_r(buf, "_", &back);
|
||||
|
||||
Reference in New Issue
Block a user