ssnail

crappy and opinionated static site generator
git clone https://git.e1e0.net/ssnail.git
Log | Files | Refs | README | LICENSE

commit 1e4ebeb8fbb964a04c821e3e73784f3e28a2b449
parent 991ea6f0a6b5d6d54eaf85aa2c2471a722b5e0c1
Author: Paco Esteban <paco@e1e0.net>
Date:   Thu, 11 Feb 2021 15:05:09 +0100

compiler warnings cleanup

Diffstat:
Merror.c | 2+-
Mhelpers.c | 5++---
Mssnail.c | 2--
3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/error.c b/error.c @@ -33,7 +33,7 @@ const struct ssnail_error * ssnail_error_msg(int code, const char *msg) { static struct ssnail_error error; - int i; + size_t i; for (i = 0; i < nitems(ssnail_errors); i++) { if (code == ssnail_errors[i].code) { diff --git a/helpers.c b/helpers.c @@ -28,7 +28,7 @@ char * build_full_path(char *dir, char *file) { - int n = 0; + size_t n = 0; char *fullpath = NULL, separator[2] = ""; /* if user input does not have trailing slash, add it */ @@ -50,7 +50,6 @@ copy_file(const char *source_file, const char *dest_file, int force) { FILE *src, *dst; struct stat st; - char ch; long long src_mtime, dst_mtime; if (stat(source_file, &st) == -1) @@ -106,7 +105,7 @@ get_filename_ext(const char *filename) int load_from_file(char **buffer, char *path) { - long length; + long length = -1; FILE *f = NULL; if ((f = fopen(path, "r")) == NULL) diff --git a/ssnail.c b/ssnail.c @@ -262,7 +262,6 @@ gen_html(struct article *a) struct lowdown_metaq mq; struct lowdown_meta *md; const struct ssnail_error *error = NULL; - size_t orig_size = 0; TAILQ_INIT(&mq); /* create the queue(linked list) of lowdown_meta */ memset(&opts, 0, sizeof(struct lowdown_opts)); /* init opts to 0 */ @@ -384,7 +383,6 @@ populate_article_entry(char *src_path, char *dst_path) { struct article *ap = init_article(); struct stat st; - int len = 0; if (ap == NULL) return NULL;