OBJECTS-$(CONFIG_FreeBSD) += src/xenstat_freebsd.o
SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR)
-CFLAGS+=-fPIC
+CFLAGS+=-fPIC -Werror
CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude) -include $(XEN_ROOT)/tools/config.h
LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) -lyajl
{
/* Helper variables for parseNetDevLine() function defined above */
int i;
- char line[512] = { 0 }, iface[16] = { 0 }, devBridge[16] = { 0 }, devNoBridge[16] = { 0 };
+ char line[512] = { 0 }, iface[16] = { 0 }, devBridge[16] = { 0 }, devNoBridge[17] = { 0 };
unsigned long long rxBytes, rxPackets, rxErrs, rxDrops, txBytes, txPackets, txErrs, txDrops;
struct priv_data *priv = get_priv_data(node->handle);
/* We get the bridge devices for use with bonding interface to get bonding interface stats */
getBridge("vir", devBridge, sizeof(devBridge));
- snprintf(devNoBridge, 16, "p%s", devBridge);
+ snprintf(devNoBridge, sizeof(devNoBridge), "p%s", devBridge);
while (fgets(line, 512, priv->procnetdev)) {
xenstat_domain *domain;