#define CMD_GOTO_TAG "!picktag fetch tags"
/* Command used to open file in editor at a given line */
-static char* EditCmd[] = (char*[]){ "tide", "-l", 0, 0, 0 };
+static char* EditCmd[] = { "tide", "-l", 0, 0, 0 };
/* The shell: Filled in with $SHELL. Used to execute commands */
static char* ShellCmd[] = { 0, "-c", 0, 0 };
#endif
#pragma GCC diagnostic pop
-
# Customize this file to fit your system
# number of threads/cores to use
-MAKEFLAGS = -j4
+MAKEFLAGS += -j
# Install location
#PREFIX = $(HOME)
# Compiler Setup
CC = cc
-CFLAGS = -g --std=c99 -MMD $(INCS)
+CFLAGS = -g -MMD $(INCS)
+CFLAGS += --std=c99 -pedantic
CFLAGS += -Wall -Wextra
-CFLAGS += -Wno-unused-function
CFLAGS += -Werror
# Linker Setup
#include <stdarg.h>
#include <string.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+
static char* strmcat(char* first, ...) {
va_list args;
/* calculate the length of the final string */
#define max(x,y) \
((x) > (y) ? (x) : (y))
#endif
+
+#pragma GCC diagnostic pop
#include <stdlib.h>
#include <string.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+
typedef struct {
size_t elem_count;
size_t elem_size;
qsort(vec->elem_buffer, vec->elem_count, vec->elem_size, cmpfn);
}
+#pragma GCC diagnostic pop
+
#endif /* VEC_H */
#include <signal.h>
#include <locale.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+
typedef struct XConf {
int fd, screen, width, height;
Window root;
for (int status; waitpid(-1, &status, WNOHANG) > 0;);
}
}
+
+#pragma GCC diagnostic pop
} Tag;
char* ARGV0;
-static Tag Builtins[];
+static Tag Builtins[16];
/* Tag/Cmd Execution
******************************************************************************/
/* Main Routine
******************************************************************************/
-static Tag Builtins[] = {
+static Tag Builtins[16] = {
{ .tag = "Cut", .action = cut },
{ .tag = "Copy", .action = copy },
{ .tag = "Del", .action = quit },