~bitfehler/public-inbox

scd2html: Fix compilation issues with clang v1 PROPOSED

Hannes Braun: 1
 Fix compilation issues with clang

 3 files changed, 2 insertions(+), 4 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~bitfehler/public-inbox/patches/46811/mbox | git am -3
Learn more about email & git

[PATCH scd2html] Fix compilation issues with clang Export this patch

Signed-off-by: Hannes Braun <hannes@hannesbraun.net>
---
 include/str.h | 2 +-
 src/main.c    | 2 --
 src/string.c  | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/str.h b/include/str.h
index ab7ba69..c796b78 100644
--- a/include/str.h
+++ b/include/str.h
@@ -7,7 +7,7 @@ struct str {
	size_t len, size;
};

struct str *str_create();
struct str *str_create(void);
void str_free(struct str *str);
void str_reset(struct str *str);
int str_append_ch(struct str *str, uint32_t ch);
diff --git a/src/main.c b/src/main.c
index b08c8a3..3673b40 100644
--- a/src/main.c
+++ b/src/main.c
@@ -252,7 +252,6 @@ static uint32_t parse_word(struct parser *p) {

static void parse_text(struct parser *p, bool linkify) {
	uint32_t ch, next, last = ' ';
	int i = 0;
	while ((ch = parser_getch(p)) != UTF8_INVALID) {
		switch (ch) {
		case '\\':
@@ -325,7 +324,6 @@ static void parse_text(struct parser *p, bool linkify) {
			utf8_fputch(p->output, ch);
			break;
		}
		++i;
	}
}

diff --git a/src/string.c b/src/string.c
index 2fbacbe..da605ce 100644
--- a/src/string.c
+++ b/src/string.c
@@ -12,7 +12,7 @@ static void ensure_capacity(struct str *str, size_t len) {
	}
}

struct str *str_create() {
struct str *str_create(void) {
	struct str *str = xcalloc(1, sizeof(struct str));
	str->str = xcalloc(16, 1);
	str->size = 16;
-- 
2.39.3 (Apple Git-145)
Hey there,

sorry for taking so long, I had accidentally moved this email to the 
wrong place. Applied, thanks a lot.

Cheers,
Conrad