From ac044784a6ce64ff15610d4b70750065a7f01b80 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 1 Sep 2015 21:07:54 +0200 Subject: start on makefile and fixing warnings and errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/string/strspn.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/string/strspn.c') diff --git a/src/string/strspn.c b/src/string/strspn.c index cf82529..3facfd8 100644 --- a/src/string/strspn.c +++ b/src/string/strspn.c @@ -16,7 +16,9 @@ * along with this program. If not, see . */ #include -#include + + +# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" @@ -59,7 +61,7 @@ size_t strcspn(const char* string, const char* stopset) char c; const char* s = string; memset(set, 0, 256); - while ((c = *skipset++)) + while ((c = *stopset++)) set[(size_t)c] = 1; while ((c = *s++)) if (!set[(size_t)c]) @@ -86,7 +88,7 @@ char* stpbrk(const char* string, const char* stopset) char c; const char* s = string; memset(set, 0, 256); - while ((c = *skipset++)) + while ((c = *stopset++)) set[(size_t)c] = 1; while ((c = *s++)) if (!set[(size_t)c]) -- cgit v1.2.3-70-g09d2