diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-27 20:43:19 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-27 20:43:19 +0100 |
commit | f2c5ac590d442a32e2d5cd77af776a05b977b949 (patch) | |
tree | 0dc1859835688927e127920e2ca3f89ff9012a28 /src/string | |
parent | fix errors (diff) | |
download | slibc-f2c5ac590d442a32e2d5cd77af776a05b977b949.tar.gz slibc-f2c5ac590d442a32e2d5cd77af776a05b977b949.tar.bz2 slibc-f2c5ac590d442a32e2d5cd77af776a05b977b949.tar.xz |
fix errors and warnings
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | src/string/str/rawstrstr.c | 1 | ||||
-rw-r--r-- | src/string/str/strcaseends.c | 3 | ||||
-rw-r--r-- | src/string/str/strcasestarts.c | 3 | ||||
-rw-r--r-- | src/string/str/strends.c | 3 | ||||
-rw-r--r-- | src/string/str/strpbrk.c | 3 | ||||
-rw-r--r-- | src/string/str/strset.c | 4 | ||||
-rw-r--r-- | src/string/str/strstarts.c | 3 |
7 files changed, 18 insertions, 2 deletions
diff --git a/src/string/str/rawstrstr.c b/src/string/str/rawstrstr.c index 8349210..e733583 100644 --- a/src/string/str/rawstrstr.c +++ b/src/string/str/rawstrstr.c @@ -16,6 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <string.h> +#include <stdint.h> diff --git a/src/string/str/strcaseends.c b/src/string/str/strcaseends.c index b9a1756..bc7d765 100644 --- a/src/string/str/strcaseends.c +++ b/src/string/str/strcaseends.c @@ -18,6 +18,9 @@ #include <string.h> +# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" + + /** * Check whether a string ends with a specific string. diff --git a/src/string/str/strcasestarts.c b/src/string/str/strcasestarts.c index d17b936..e014080 100644 --- a/src/string/str/strcasestarts.c +++ b/src/string/str/strcasestarts.c @@ -18,6 +18,9 @@ #include <string.h> +# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" + + /** * Check whether a string starts with a specific string. diff --git a/src/string/str/strends.c b/src/string/str/strends.c index 43dd562..336106f 100644 --- a/src/string/str/strends.c +++ b/src/string/str/strends.c @@ -18,6 +18,9 @@ #include <string.h> +# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" + + /** * Check whether a string ends with a specific string. diff --git a/src/string/str/strpbrk.c b/src/string/str/strpbrk.c index 4cfb9ed..ce5b7c6 100644 --- a/src/string/str/strpbrk.c +++ b/src/string/str/strpbrk.c @@ -18,6 +18,9 @@ #include <string.h> +# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" + + /** * This function works like `strcspn`, diff --git a/src/string/str/strset.c b/src/string/str/strset.c index ac1d551..a1ff63f 100644 --- a/src/string/str/strset.c +++ b/src/string/str/strset.c @@ -33,9 +33,9 @@ */ char* strset(char* str, int c) { - char* s = segment; + char* s = str; while (*s) *s++ = (char)c; - return segment; + return str; } diff --git a/src/string/str/strstarts.c b/src/string/str/strstarts.c index e562f63..04ed7ad 100644 --- a/src/string/str/strstarts.c +++ b/src/string/str/strstarts.c @@ -18,6 +18,9 @@ #include <string.h> +# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" + + /** * Check whether a string starts with a specific string. |