diff options
author | David du Colombier <0intro@gmail.com> | 2014-02-13 20:05:55 +0100 |
---|---|---|
committer | David du Colombier <0intro@gmail.com> | 2014-02-13 20:05:55 +0100 |
commit | a2e04d1583c488aa22dcc4c7bc84841134cdf7db (patch) | |
tree | 9fd48c9db939b9e679a4ee067140de5413792477 /src/lib9/utf | |
parent | 0d4bf7eff89c6027adf6a408ca9481885305d178 (diff) | |
download | go-a2e04d1583c488aa22dcc4c7bc84841134cdf7db.tar.gz |
lib9: fix inconsistencies and warnings on Plan 9
warning: src/lib9/fmt/dorfmt.c:64 unreachable code RETURN
warning: src/lib9/fmt/fltfmt.c:184 set and not used: p
warning: src/lib9/utf/utflen.c:35 unreachable code RETURN
warning: src/lib9/utf/utfrrune.c:45 unreachable code RETURN
warning: src/lib9/utf/utfrune.c:44 unreachable code RETURN
LGTM=rsc
R=rsc, iant, gobot
CC=golang-codereviews
https://codereview.appspot.com/57170052
Diffstat (limited to 'src/lib9/utf')
-rw-r--r-- | src/lib9/utf/utfecpy.c | 4 | ||||
-rw-r--r-- | src/lib9/utf/utflen.c | 1 | ||||
-rw-r--r-- | src/lib9/utf/utfrrune.c | 4 | ||||
-rw-r--r-- | src/lib9/utf/utfrune.c | 4 | ||||
-rw-r--r-- | src/lib9/utf/utfutf.c | 3 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/lib9/utf/utfecpy.c b/src/lib9/utf/utfecpy.c index 2eca85ef6..854066460 100644 --- a/src/lib9/utf/utfecpy.c +++ b/src/lib9/utf/utfecpy.c @@ -11,8 +11,8 @@ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. */ -#define _BSD_SOURCE 1 -#include <string.h> +#include <u.h> +#include <libc.h> #include "utf.h" #include "utfdef.h" diff --git a/src/lib9/utf/utflen.c b/src/lib9/utf/utflen.c index 42fcb33ab..9b961856a 100644 --- a/src/lib9/utf/utflen.c +++ b/src/lib9/utf/utflen.c @@ -32,5 +32,4 @@ utflen(const char *s) s += chartorune(&rune, s); n++; } - return 0; } diff --git a/src/lib9/utf/utfrrune.c b/src/lib9/utf/utfrrune.c index 9e28af82a..b1ea93b42 100644 --- a/src/lib9/utf/utfrrune.c +++ b/src/lib9/utf/utfrrune.c @@ -11,7 +11,8 @@ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. */ -#include <string.h> +#include <u.h> +#include <libc.h> #include "utf.h" #include "utfdef.h" @@ -42,5 +43,4 @@ utfrrune(const char *s, Rune c) s1 = s; s += c1; } - return 0; } diff --git a/src/lib9/utf/utfrune.c b/src/lib9/utf/utfrune.c index 0136b2821..44675c989 100644 --- a/src/lib9/utf/utfrune.c +++ b/src/lib9/utf/utfrune.c @@ -11,7 +11,8 @@ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. */ -#include <string.h> +#include <u.h> +#include <libc.h> #include "utf.h" #include "utfdef.h" @@ -41,5 +42,4 @@ utfrune(const char *s, Rune c) return (char*)s; s += n; } - return 0; } diff --git a/src/lib9/utf/utfutf.c b/src/lib9/utf/utfutf.c index e46ddd923..05335b23e 100644 --- a/src/lib9/utf/utfutf.c +++ b/src/lib9/utf/utfutf.c @@ -11,7 +11,8 @@ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. */ -#include <string.h> +#include <u.h> +#include <libc.h> #include "utf.h" #include "utfdef.h" |