Github messages for mblaze
 help / color / mirror / Atom feed
* [PR PATCH] Minor pedantic fixes
@ 2020-09-24 22:29 michaelforney
  2020-09-25 12:54 ` [PR PATCH] [Closed]: " leahneukirchen
  2020-09-25 12:54 ` leahneukirchen
  0 siblings, 2 replies; 3+ messages in thread
From: michaelforney @ 2020-09-24 22:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

There is a new pull request by michaelforney against master on the mblaze repository

https://github.com/michaelforney/mblaze pedantic-fixes
https://github.com/leahneukirchen/mblaze/pull/185

Minor pedantic fixes
Just a couple of things I noticed when building with `CFLAGS='-std=c99 -Wpedantic -D_XOPEN_SOURCE=700`.

A patch file from https://github.com/leahneukirchen/mblaze/pull/185.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pedantic-fixes-185.patch --]
[-- Type: text/x-diff, Size: 2268 bytes --]

From 875a6e70356b6bc3d6d72d8d2a91d9012ec641e7 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Thu, 17 Sep 2020 12:16:34 -0700
Subject: [PATCH 1/2] include strings.h for str(n)casecmp

These POSIX functions are declared in strings.h, so include this
header explicitly instead of relying on the libc's default feature-test
macros to include it through string.h.
---
 magrep.c   | 1 +
 mdeliver.c | 1 +
 mflow.c    | 1 +
 mhdr.c     | 1 +
 4 files changed, 4 insertions(+)

diff --git a/magrep.c b/magrep.c
index 6f93a57..72ce1bb 100644
--- a/magrep.c
+++ b/magrep.c
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 
 #include "blaze822.h"
diff --git a/mdeliver.c b/mdeliver.c
index 161cea5..27c4b9c 100644
--- a/mdeliver.c
+++ b/mdeliver.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 
 #include "blaze822.h"
diff --git a/mflow.c b/mflow.c
index af6755d..1013da5 100644
--- a/mflow.c
+++ b/mflow.c
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 
 #include "blaze822.h"
diff --git a/mhdr.c b/mhdr.c
index d434d1d..83bed02 100644
--- a/mhdr.c
+++ b/mhdr.c
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 
 #include "blaze822.h"

From 33ea06a5b61debdf9bbced2bc546b342ab4aa0cc Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Thu, 17 Sep 2020 12:24:08 -0700
Subject: [PATCH 2/2] mpick: use function pointer type for callback

Though POSIX requires this conversion to work correctly (for dlsym),
it is not valid in ISO C, so it is better to just uses the appropriate
function pointer type.
---
 mpick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mpick.c b/mpick.c
index 379200d..3b11e67 100644
--- a/mpick.c
+++ b/mpick.c
@@ -1466,7 +1466,7 @@ main(int argc, char *argv[])
 
 	xpledge("stdio rpath wpath cpath proc exec", 0);
 
-	void *cb = need_thr ? collect : oneline;
+	void (*cb)(char *) = need_thr ? collect : oneline;
 	if (argc == optind && isatty(0))
 		i = blaze822_loop1(":", cb);
 	else

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Closed]: Minor pedantic fixes
  2020-09-24 22:29 [PR PATCH] Minor pedantic fixes michaelforney
@ 2020-09-25 12:54 ` leahneukirchen
  2020-09-25 12:54 ` leahneukirchen
  1 sibling, 0 replies; 3+ messages in thread
From: leahneukirchen @ 2020-09-25 12:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

There's a closed pull request on the mblaze repository

Minor pedantic fixes
https://github.com/leahneukirchen/mblaze/pull/185

Description:
Just a couple of things I noticed when building with `CFLAGS='-std=c99 -Wpedantic -D_XOPEN_SOURCE=700`.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Minor pedantic fixes
  2020-09-24 22:29 [PR PATCH] Minor pedantic fixes michaelforney
  2020-09-25 12:54 ` [PR PATCH] [Closed]: " leahneukirchen
@ 2020-09-25 12:54 ` leahneukirchen
  1 sibling, 0 replies; 3+ messages in thread
From: leahneukirchen @ 2020-09-25 12:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/pull/185#issuecomment-698911438

Comment:
Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-25 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 22:29 [PR PATCH] Minor pedantic fixes michaelforney
2020-09-25 12:54 ` [PR PATCH] [Closed]: " leahneukirchen
2020-09-25 12:54 ` leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).