Skip to content

Commit

Permalink
Merge pull request iqiyi#206 from hallelujah-shih/master
Browse files Browse the repository at this point in the history
fix dpvs compile error on gcc 8.x
  • Loading branch information
beacer authored Jun 21, 2018
2 parents ff3e0b3 + f79a6e8 commit 8bae048
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ CFLAGS += -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -mcmodel=medium

ifeq ($(shell test $(GCC_VERSION) -ge 70 && echo 1), 1)
CFLAGS += -Wno-format-truncation
CFLAGS += -Wno-stringop-truncation
CFLAGS += -Wstringop-overflow=0
endif

ifeq ($(DEBUG),)
Expand Down
2 changes: 1 addition & 1 deletion src/netif.c
Original file line number Diff line number Diff line change
Expand Up @@ -4182,7 +4182,7 @@ static int get_port_basic(struct netif_port *port, void **out, size_t *out_len)
}

get->port_id = port->id;
strncpy(get->name, port->name, sizeof(port->name));
strncpy(get->name, port->name, sizeof(get->name));
get->nrxq = port->nrxq;
get->ntxq = port->ntxq;
ether_format_addr(get->addr, sizeof(get->addr), &port->addr);
Expand Down

0 comments on commit 8bae048

Please sign in to comment.