diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-09-01 21:27:15 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-09-01 21:27:15 +0200 |
commit | 972447bc2541034c85fec5d47f2bace03124c00b (patch) | |
tree | 24bc2ea1f1eb670095333224f63fd01f9f925c57 /src | |
parent | start on makefile and fixing warnings and errors (diff) | |
download | slibc-972447bc2541034c85fec5d47f2bace03124c00b.tar.gz slibc-972447bc2541034c85fec5d47f2bace03124c00b.tar.bz2 slibc-972447bc2541034c85fec5d47f2bace03124c00b.tar.xz |
fix some more errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/errno.c | 1 | ||||
-rw-r--r-- | src/libgen.c | 7 | ||||
-rw-r--r-- | src/wchar/wcsdup.c | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/errno.c b/src/errno.c index 80b46fe..aae7513 100644 --- a/src/errno.c +++ b/src/errno.c @@ -16,6 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <errno.h> +#include <stddef.h> diff --git a/src/libgen.c b/src/libgen.c index f8c338b..8ab303e 100644 --- a/src/libgen.c +++ b/src/libgen.c @@ -20,6 +20,9 @@ #include <stddef.h> +# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" + + /** * Get the basename of a filename. @@ -63,9 +66,9 @@ char* __xpg_basename(char* filename) { char* r = __gnu_basename(filename); char* p; - if (strcmp(".")) + if (strcmp(r, ".")) for (p = r + 1; *p; p++) - if (p == '/') + if (*p == '/') *p = 0; return r; } diff --git a/src/wchar/wcsdup.c b/src/wchar/wcsdup.c index 37b57f9..fa68834 100644 --- a/src/wchar/wcsdup.c +++ b/src/wchar/wcsdup.c @@ -16,6 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <wchar.h> +#include <stdlib.h> |