4a861a6f6b
Now passes gcc -Wall -Wextra -Wmissing-declarations -Wwrite-strings on gcc45. May build with clang now too. Changes: - use standard headers - don't declare own errno, fopen(), getenv(), or malloc() - declare own functions - declare void functions void - avoid implicit int - use C89 - use some const - use some static - fix signed/unsigned mismatches - call execl() properly - don't cast return value of malloc - initialize struct sigaction correctly - use <ctype.h> functions correctly - don't index arrays with (signed) char - don't put function declarations inside function bodies - patch up two uninitialized variables - silence some compiler warnings that are not bugs - remove some unused objects and: - add patch comments for preexisting patches - correct some minor pkglint As a couple of these things fixed bugs (e.g. the execl calls), bump PKGREVISION.
27 lines
613 B
C
27 lines
613 B
C
$NetBSD: patch-te__data.c,v 1.1 2012/12/27 06:13:20 dholland Exp $
|
|
|
|
- use const for string constants
|
|
- silence warning about initializer
|
|
|
|
--- te_data.c.orig 1993-08-05 22:29:33.000000000 +0000
|
|
+++ te_data.c
|
|
@@ -12,7 +12,7 @@
|
|
#include "te_defs.h"
|
|
|
|
/* error message text */
|
|
-char *errors[] =
|
|
+const char *errors[] =
|
|
{
|
|
"> not in iteration",
|
|
"Can't pop Q register",
|
|
@@ -77,8 +77,8 @@ char *errors[] =
|
|
/* the text buffer headers */
|
|
struct bh buffs[2] =
|
|
{
|
|
- { NULL, NULL, 0, 0, 0 },
|
|
- { NULL, NULL, 0, 0, 0 }
|
|
+ { NULL, NULL, 0, 0, 0, 0 },
|
|
+ { NULL, NULL, 0, 0, 0, 0 }
|
|
} ;
|
|
struct bh *pbuff = buffs;
|
|
|