aboutsummaryrefslogtreecommitdiffstats
path: root/src/string/strspn.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-01 21:07:54 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-01 21:07:54 +0200
commitac044784a6ce64ff15610d4b70750065a7f01b80 (patch)
tree8ac8629c0089099f21be9107a5d3779963d33ca0 /src/string/strspn.c
parentadd memfrob (diff)
downloadslibc-ac044784a6ce64ff15610d4b70750065a7f01b80.tar.gz
slibc-ac044784a6ce64ff15610d4b70750065a7f01b80.tar.bz2
slibc-ac044784a6ce64ff15610d4b70750065a7f01b80.tar.xz
start on makefile and fixing warnings and errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/string/strspn.c8
1 files changed, 5 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>.
*/
#include <string.h>
-#include <stddef.h>
+
+
+# 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])