Remove unused parameter
authormarkus schnalke <meillo@marmaro.de>
Tue, 3 Nov 2015 07:36:45 +0000 (08:36 +0100)
committermarkus schnalke <meillo@marmaro.de>
Wed, 4 Nov 2015 17:37:58 +0000 (18:37 +0100)
Reported by -Wextra -pedantic.

uip/whatnow.c

index 7e54929..4b45a0c 100644 (file)
@@ -72,7 +72,7 @@ static char *myprompt = "\nWhat now? ";
 /*
 ** static prototypes
 */
 /*
 ** static prototypes
 */
-static int editfile(char **, char **, char *, int);
+static int editfile(char **, char **, char *);
 static int sendfile(char **, char *);
 static int refile(char **, char *);
 static int removefile(char *);
 static int sendfile(char **, char *);
 static int refile(char **, char *);
 static int removefile(char *);
@@ -85,7 +85,7 @@ static int system_in_dir(const char *, const char *);
 int
 main(int argc, char **argv)
 {
 int
 main(int argc, char **argv)
 {
-       int use = 0;
+       int use = NOUSE;
        char *cp;
        char *ed = NULL, *drft = NULL;
        char buf[BUFSIZ], prompt[BUFSIZ];
        char *cp;
        char *ed = NULL, *drft = NULL;
        char buf[BUFSIZ], prompt[BUFSIZ];
@@ -164,7 +164,7 @@ main(int argc, char **argv)
 
        /* start editing the draft, unless editor is the empty string */
        if (*ed) {
 
        /* start editing the draft, unless editor is the empty string */
        if (*ed) {
-               if (editfile(&ed, NULL, drft, use) <0) {
+               if (editfile(&ed, NULL, drft) <0) {
                        if (!use) {
                                unlink(drft);
                        }
                        if (!use) {
                                unlink(drft);
                        }
@@ -192,7 +192,7 @@ main(int argc, char **argv)
                        /* Call an editor on the draft file */
                        if (*++argp)
                                ed = *argp++;
                        /* Call an editor on the draft file */
                        if (*++argp)
                                ed = *argp++;
-                       editfile(&ed, argp, drft, NOUSE);
+                       editfile(&ed, argp, drft);
                        break;
 
                case LISTSW:
                        break;
 
                case LISTSW:
@@ -489,7 +489,7 @@ static char *edsave = NULL;  /* the editor we used previously */
 
 
 static int
 
 
 static int
-editfile(char **ed, char **arg, char *file, int use)
+editfile(char **ed, char **arg, char *file)
 {
        int pid, status, vecp;
        char *cp, *vec[MAXARGS];
 {
        int pid, status, vecp;
        char *cp, *vec[MAXARGS];