warnings in travis
This commit is contained in:
parent
7bcd6aed08
commit
7350ec1624
5 changed files with 11 additions and 9 deletions
|
|
@ -216,9 +216,11 @@ distclean: clean
|
||||||
.c.o: $(GENSRC)
|
.c.o: $(GENSRC)
|
||||||
rm -f $@ && $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $<
|
rm -f $@ && $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $<
|
||||||
|
|
||||||
|
# Compute the length of the date command (and add some extra woith XXX)
|
||||||
|
DATELEN != date +"%Y.%m.%d %H:%M by `whoami` on `hostname`XXXX"|wc -c
|
||||||
.PHONY: build.c
|
.PHONY: build.c
|
||||||
build.c:
|
build.c:
|
||||||
date +"const char CLIXON_BUILDSTR[64]=\"%Y.%m.%d %H:%M by `whoami` on `hostname`"\"\; > build.c;
|
date +"const char CLIXON_BUILDSTR[$(DATELEN)]=\"%Y.%m.%d %H:%M by `whoami` on `hostname`"\"\; > build.c;
|
||||||
echo "const char CLIXON_VERSION[64]=\"$(CLIXON_VERSION)\""\; >> build.c;
|
echo "const char CLIXON_VERSION[64]=\"$(CLIXON_VERSION)\""\; >> build.c;
|
||||||
|
|
||||||
$(MYLIB) : $(GENOBJS) $(OBJS)
|
$(MYLIB) : $(GENOBJS) $(OBJS)
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ keyval_set(char *name,
|
||||||
{
|
{
|
||||||
cg_var *cv = NULL;
|
cg_var *cv = NULL;
|
||||||
|
|
||||||
clicon_debug(1, "%s(%s=%s)", __FUNCTION__, name, val);
|
clicon_debug(1, "%s(%s=%s)", __FUNCTION__, name?name:"NULL", val);
|
||||||
if ((cv = cv_new(CGV_STRING)) == NULL){
|
if ((cv = cv_new(CGV_STRING)) == NULL){
|
||||||
clicon_err(OE_UNIX, errno, "cv_new");
|
clicon_err(OE_UNIX, errno, "cv_new");
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
||||||
|
|
@ -622,7 +622,7 @@ stream_notify_xml(clicon_handle h,
|
||||||
cxobj *xev = NULL;
|
cxobj *xev = NULL;
|
||||||
cxobj *xml2; /* copy */
|
cxobj *xml2; /* copy */
|
||||||
yang_stmt *yspec = NULL;
|
yang_stmt *yspec = NULL;
|
||||||
char *str = NULL;
|
char *str = NULL; /* XXX: never set */
|
||||||
cbuf *cb = NULL;
|
cbuf *cb = NULL;
|
||||||
char timestr[28];
|
char timestr[28];
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
@ -644,7 +644,7 @@ stream_notify_xml(clicon_handle h,
|
||||||
clicon_err(OE_UNIX, errno, "time2str");
|
clicon_err(OE_UNIX, errno, "time2str");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
cprintf(cb, "<notification xmlns=\"urn:ietf:params:xml:ns:netconf:notification:1.0\"><eventTime>%s</eventTime>%s</notification>", timestr, str);
|
cprintf(cb, "<notification xmlns=\"urn:ietf:params:xml:ns:netconf:notification:1.0\"><eventTime>%s</eventTime>NULL</notification>", timestr); /* XXX str is always NULL */
|
||||||
if (xml_parse_string(cbuf_get(cb), yspec, &xev) < 0)
|
if (xml_parse_string(cbuf_get(cb), yspec, &xev) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (xml_rootchild(xev, 0, &xev) < 0)
|
if (xml_rootchild(xev, 0, &xev) < 0)
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,10 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define __USE_GNU /* For setresuid */
|
#define _GNU_SOURCE
|
||||||
#include <unistd.h>
|
#define __USE_GNU
|
||||||
|
#include <unistd.h> /* For setresuid */
|
||||||
|
#undef _GNU_SOURCE
|
||||||
#undef __USE_GNU
|
#undef __USE_GNU
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
@ -165,6 +167,7 @@ drop_priv_temp(uid_t new_uid)
|
||||||
{
|
{
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
|
|
||||||
|
/* XXX: implicit declaration of function 'setresuid' on travis */
|
||||||
if (setresuid(-1, new_uid, geteuid()) < 0){
|
if (setresuid(-1, new_uid, geteuid()) < 0){
|
||||||
clicon_err(OE_UNIX, errno, "setresuid");
|
clicon_err(OE_UNIX, errno, "setresuid");
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
||||||
|
|
@ -246,9 +246,6 @@ identifier [A-Za-z_][A-Za-z0-9_\-\.]*
|
||||||
<STRINGSQ>[^'\n]+ { clixon_yang_parselval.string = strdup(yytext);
|
<STRINGSQ>[^'\n]+ { clixon_yang_parselval.string = strdup(yytext);
|
||||||
return CHARS;}
|
return CHARS;}
|
||||||
|
|
||||||
<DQESC>[nt"\\] { BEGIN(_YY->yy_lex_state);
|
|
||||||
clixon_yang_parselval.string = strdup(yytext);
|
|
||||||
return CHARS; }
|
|
||||||
<DQESC>[nt"\\] { BEGIN(_YY->yy_lex_state);
|
<DQESC>[nt"\\] { BEGIN(_YY->yy_lex_state);
|
||||||
clixon_yang_parselval.string = strdup(yytext);
|
clixon_yang_parselval.string = strdup(yytext);
|
||||||
return CHARS; }
|
return CHARS; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue