zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayne@clari.net>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: remove warnings from pws 17
Date: Tue, 04 May 1999 19:08:53 -0700	[thread overview]
Message-ID: <199905050208.TAA14370@bebop.clari.net> (raw)
In-Reply-To: akr's message of 05 May 1999 10:39:45 +0900. <rsqk8uoe1lq.fsf@crane.jaist.ac.jp>

Tanaka Akira <akr@jaist.ac.jp> 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---


  reply	other threads:[~1999-05-05  2:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-05  1:39 PATCH: initialize dparr Tanaka Akira
1999-05-05  2:08 ` Wayne Davison [this message]
1999-05-05  6:37 PATCH: remove warnings from pws 17 Sven Wischnowsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199905050208.TAA14370@bebop.clari.net \
    --to=wayne@clari.net \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).