Enable -Wall

This commit is contained in:
Kamil Trzcinski
2022-04-14 10:13:18 +02:00
parent eaf4e06989
commit 9c7f5fed12
25 changed files with 41 additions and 57 deletions

View File

@ -1,5 +1,6 @@
#pragma once
#include <time.h>
#include <linux/videodev2.h>
typedef struct {

View File

@ -5,9 +5,6 @@
#include <stdio.h>
#include <limits.h>
static int option_handler_print(option_t *option, char *data);
static int option_handler_set(option_t *option, char *data);
static void print_help(option_t *options)
{
for (int i = 0; options[i].name; i++) {
@ -20,7 +17,7 @@ static void print_help(option_t *options)
char *token;
int tokens = 0;
while (token = strsep(&string, OPTION_VALUE_LIST_SEP)) {
while ((token = strsep(&string, OPTION_VALUE_LIST_SEP)) != NULL) {
if (tokens++ > 0)
printf("\n%40s\t", "");
printf("%s", token);

View File

@ -27,12 +27,12 @@ typedef struct options_s {
#define OPTION_VALUE_LIST_SEP ";"
#define OPTION_FORMAT_uint "%d"
#define OPTION_FORMAT_uint "%u"
#define OPTION_FORMAT_hex "%08x"
#define OPTION_FORMAT_bool "%d"
#define OPTION_FORMAT_float "%f"
#define OPTION_FORMAT_string "%s"
#define OPTION_FORMAT_list "%s"
#define OPTION_FORMAT_list "%s"
#define DEFINE_OPTION(_section, _name, _type) \
{ \