Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: remove warnings from pws 17
- X-seq: zsh-workers 6220
- From: Wayne Davison <wayne@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: remove warnings from pws 17
- Date: Tue, 04 May 1999 19:08:53 -0700
- In-reply-to: akr's message of 05 May 1999 10:39:45 +0900. <rsqk8uoe1lq.fsf@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Tanaka Akira <akr@xxxxxxxxxxx> said:
> initialize dparr.
That reminds me -- I generated a small patch that gets rid of all
the warnings in pws 17, and it includes this change. I've appended
my patch below. It fixes the following warnings:
+ A ambiguous else warning in rlimits.c fixed by adding braces.
+ comp_setunsetptr in comp1.c was defined as a function pointer
taking int arguments rather than unsigned ints.
+ **dparr is now initialized to NULL in zle_tricky.c to remove a
warning about a potential use of dparr without being defined.
+ A variety of #if...#endif lines were flagged with /**/ to remove
warnings about static functions that get prototyped but not defined.
+ Moved some "#if 0" lines so that they are on the same line as the
/**/ marker (obsuring it), and thus these undefined functions do
not get any prototypes.
..wayne..
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Src/Builtins/rlimits.c
@@ -43,14 +43,14 @@
{
rlim_t ret = 0;
- if (!base)
+ if (!base) {
if (*s != '0')
base = 10;
else if (*++s == 'x' || *s == 'X')
base = 16, s++;
else
base = 8;
-
+ }
if (base <= 10)
for (; *s >= '0' && *s < ('0' + base); s++)
ret = ret * base + *s - '0';
Index: Src/Zle/comp1.c
@@ -47,7 +47,7 @@
void (*makecompparamsptr) _((void));
/**/
-void (*comp_setunsetptr) _((int, int));
+void (*comp_setunsetptr) _((unsigned int, unsigned int));
/* pointers to functions required by compctl and defined by zle */
Index: Src/Zle/zle_tricky.c
@@ -3524,7 +3524,7 @@
addmatches(Cadata dat, char **argv)
{
char *s, *ms, *lipre = NULL, *lisuf = NULL, *lpre = NULL, *lsuf = NULL;
- char **aign = NULL, **dparr;
+ char **aign = NULL, **dparr = NULL;
int lpl, lsl, pl, sl, bpl, bsl, llpl = 0, llsl = 0, nm = mnum;
int oisalt = 0, isalt, isexact, doadd;
Cline lc = NULL;
Index: Src/hashtable.c
@@ -498,6 +498,7 @@
resizehashtable(ht, ht->hsize);
}
+/**/
#ifdef ZSH_HASH_DEBUG
/* Print info about hash table */
@@ -550,6 +551,7 @@
return 0;
}
+/**/
#endif /* ZSH_HASH_DEBUG */
/********************************/
Index: Src/hist.c
@@ -1362,10 +1362,9 @@
return 0;
}
-#if 0
/* read an arbitrary amount of data into a buffer until stop is found */
-/**/
+#if 0 /**/
char *
hdynread(int stop)
{
Index: Src/module.c
@@ -142,6 +142,7 @@
return 0;
}
+/**/
#ifdef DYNAMIC
/* $module_path ($MODULE_PATH) */
@@ -408,6 +409,7 @@
return NULL;
}
+/**/
#ifdef AIXDYNAMIC
/**/
@@ -438,6 +440,7 @@
return ((int (*)_((int,Module))) m->handle)(3, m);
}
+/**/
#else
static Module_func
@@ -523,6 +526,7 @@
return r;
}
+/**/
#endif /* !AIXDYNAMIC */
/**/
@@ -1097,6 +1101,7 @@
}
}
+/**/
#endif /* DYNAMIC */
/* The list of module-defined conditions. */
@@ -1252,6 +1257,7 @@
return 1;
}
+/**/
#ifdef DYNAMIC
/* This adds a definition for autoloading a module for a condition. */
@@ -1342,4 +1348,5 @@
pm->flags |= PM_AUTOLOAD;
}
+/**/
#endif
Index: Src/params.c
@@ -282,6 +282,7 @@
return ht;
}
+/**/
#ifdef DYNAMIC
/**/
static HashNode
@@ -299,6 +300,7 @@
}
return hn;
}
+/**/
#endif /* DYNAMIC */
/* Copy a parameter hash table */
Index: Src/signals.c
@@ -129,10 +129,9 @@
install_handler(SIGINT);
}
-#if 0
/* disable ^C interrupts */
-/**/
+#if 0 /**/
void
nointr(void)
{
Index: Src/text.c
@@ -72,10 +72,9 @@
tptr += sl;
}
-#if 0
/* add an integer to the text buffer */
-/**/
+#if 0 /**/
void
taddint(int x)
{
Index: Src/utils.c
@@ -209,10 +209,9 @@
return buf;
}
-#if 0
/* Output a string's visible representation. */
-/**/
+#if 0 /**/
void
nicefputs(char *s, FILE *f)
{
@@ -3343,10 +3342,9 @@
return ret;
}
-#if 0
/* Unmetafy and output a string, double quoting it in its entirety. */
-/**/
+#if 0 /**/
int
dquotedzputs(char const *s, FILE *stream)
{
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Messages sorted by:
Reverse Date,
Date,
Thread,
Author