From e7c68cb60e037f3b9ff8e8162e5a809c4c649e44 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 8 Apr 2022 23:09:24 +0200 Subject: [PATCH] Validate headers --- Makefile | 3 +++ device/hw/buffer_list.h | 9 +++++++-- device/hw/links.c | 2 +- device/hw/links.h | 3 ++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 13b7f25..386679e 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,9 @@ install: $(TARGET) clean: rm -f .depend $(OBJS) $(OBJS:.o=.d) $(HTML_SRC) $(TARGET) +headers: + find -name '*.h' | xargs -n1 gcc $(CFLAGS) -Wno-error -c -o /dev/null + -include $(OBJS:.o=.d) %.o: %.c diff --git a/device/hw/buffer_list.h b/device/hw/buffer_list.h index 5d62746..ee6de95 100644 --- a/device/hw/buffer_list.h +++ b/device/hw/buffer_list.h @@ -1,10 +1,15 @@ #pragma once -#include "v4l2.h" +#include +#include +#include + +typedef struct buffer_s buffer_t; +typedef struct device_s device_t; typedef struct buffer_list_s { char *name; - struct device_s *device; + device_t *device; buffer_t **bufs; int nbufs; int type; diff --git a/device/hw/links.c b/device/hw/links.c index 9d0d750..5e4b578 100644 --- a/device/hw/links.c +++ b/device/hw/links.c @@ -1,7 +1,7 @@ +#include "device/hw/links.h" #include "device/hw/device.h" #include "device/hw/buffer.h" #include "device/hw/buffer_list.h" -#include "device/hw/links.h" #define N_FDS 50 #define QUEUE_ON_CAPTURE // seems to provide better latency diff --git a/device/hw/links.h b/device/hw/links.h index 360e6bd..dea7399 100644 --- a/device/hw/links.h +++ b/device/hw/links.h @@ -1,6 +1,7 @@ #pragma once -#include "v4l2.h" +#include +#include #define LINKS_LOOP_INTERVAL 100