Commit 61f50a9c authored by Andrey Vagin's avatar Andrey Vagin

zdtm: remove warnings

parent 003b6e90
CFLAGS = -g -O2 -Wall
CFLAGS = -g -O2 -Wall -Werror
LIB = libzdtmtst.a
......
......@@ -27,7 +27,7 @@ void test_msg(const char *format, ...)
va_end(arg);
if (len >= msg_buf.left) { /* indicate message buffer overflow */
const static char overflow_mark[] = "\n.@.\n";
const char overflow_mark[] = "\n.@.\n";
msg_buf.left = 0;
msg_buf.ptr = msg_buf.buffer + sizeof(msg_buf.buffer);
strcpy(msg_buf.ptr - sizeof(overflow_mark), overflow_mark);
......@@ -56,7 +56,6 @@ void dump_msg(const char *fname)
return;
/* ignore errors as there's no way to report them */
write(fd, msg_buf.buffer, msg_buf.ptr - msg_buf.buffer);
out:
close(fd);
}
}
#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
......@@ -8,6 +9,7 @@
#include <sys/wait.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sched.h>
#include "zdtmtst.h"
......@@ -158,7 +160,7 @@ void test_init(int argc, char **argv)
#define STACK_SIZE (8 * 4096)
struct zdtm_clone_arg {
int pidf;
FILE *pidf;
void (*fn)(void);
};
......
LIBDIR = ../../lib
LIB = $(LIBDIR)/libzdtmtst.a
override CPPFLAGS += -I$(LIBDIR)
CFLAGS = -g -O2 -Wall
CFLAGS = -g -O2 -Wall -Werror
TST_NOFILE = \
busyloop00 \
......
......@@ -33,7 +33,7 @@ int main(int argc, char **argv)
int fd, fd_s;
int status;
pid_t pid;
int ret, res;
int res;
uint32_t crc;
test_init(argc, argv);
......
LIBDIR = ../../lib
LIB = $(LIBDIR)/libzdtmtst.a
override CPPFLAGS += -I$(LIBDIR)
CFLAGS = -g -O2 -Wall
CFLAGS = -g -O2 -Wall -Werror
TST_NOFILE = \
pipe_loop00 \
......
......@@ -68,7 +68,6 @@ cmd_t cmd[CMD_NUM]={form_request_add, form_request_del};
int main(int argc, char *argv[])
{
int ret=0;
int i;
test_init(argc, argv);
......@@ -85,7 +84,6 @@ int main(int argc, char *argv[])
la.nl_pid = getpid();
if (bind(fd, (struct sockaddr*) &la, sizeof(la))){
err("bind failed: %m ");
ret=-1;
goto out;
}
//Preperation:
......
LIBDIR = ../../lib
LIB = $(LIBDIR)/libzdtmtst.a
override CPPFLAGS += -I$(LIBDIR)
CFLAGS = -g -O2 -Wall
CFLAGS = -g -O2 -Wall -Werror
TST_NOFILE = \
file_read \
......
......@@ -59,7 +59,7 @@ static void run_child(int num)
int fd = fds[num][1];
uint32_t crc = ~0;
size_t buf_size=512;
char buf[buf_size];
uint8_t buf[buf_size];
struct timeval tv;
struct timespec ts;
int rv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment