File: 06-gcc-warnings.patch

package info (click to toggle)
super 3.30.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,860 kB
  • sloc: ansic: 24,673; sh: 297; makefile: 296
file content (106 lines) | stat: -rw-r--r-- 2,789 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
From: Robert Luberda <robert@debian.org>
Date: Sat, 19 Apr 2008 18:01:00 +0200
Subject: 06 gcc warnings.

Fix warnings from `gcc -Wall'.
---
 approve.c |  4 ++--
 checks.c  | 12 +++++++-----
 super.c   |  4 ++--
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/approve.c b/approve.c
index 3c27764..2e3a2a9 100644
--- a/approve.c
+++ b/approve.c
@@ -754,8 +754,8 @@ void
 printhelp(verbosity)
 int verbosity;
 {
-    char **p, *s;
-    int i, j, n;
+    char **p;
+    int i, j;
     ArgRangePat *arp;
 
     if (verbosity == HELP_BASIC) {
diff --git a/checks.c b/checks.c
index f74b7ea..e965adb 100644
--- a/checks.c
+++ b/checks.c
@@ -26,7 +26,7 @@ static char *NO  = "N";
  */
 
 static int created_user_table = 0;
-static netgrp_u_compare(pattern, user)
+static int netgrp_u_compare(pattern, user)
   char *pattern;
   char *user;
 {
@@ -50,7 +50,7 @@ static netgrp_u_compare(pattern, user)
     }
 
     item.key = keybuf;
-    if (found_item = s_hsearch(HS_USER, item, FIND)) {
+    if ((found_item = s_hsearch(HS_USER, item, FIND))) {
         return found_item->data == YES? 1: 0;
     }
     passed = innetgr(pattern, NULL, user, NULL);
@@ -73,7 +73,7 @@ static netgrp_u_compare(pattern, user)
 }
 
 static int created_host_table = 0;
-static netgrp_h_compare(pattern, host)
+static int netgrp_h_compare(pattern, host)
   char *pattern;
   char *host;
 {
@@ -97,7 +97,7 @@ static netgrp_h_compare(pattern, host)
     }
 
     item.key = keybuf;
-    if (found_item = s_hsearch(HS_HOST, item, FIND)) {
+    if ((found_item = s_hsearch(HS_HOST, item, FIND))) {
         return found_item->data == YES? 1: 0;
     }
     passed = innetgr(pattern, host, NULL, NULL);
@@ -1086,6 +1086,8 @@ char *cmd;
     char mkdirMsg[1000];
     char *authuser;
 
+    file_exists = 0;
+
     if (!localinfo.authinfo.required)
 	return 0;			/* don't need authentication */
 
@@ -1924,7 +1926,7 @@ char *gp_pat;	/* pattern to match */
     }
 
     item.key = keybuf;
-    if (found_item = s_hsearch(HS_GROUP, item, FIND)) {
+    if ((found_item = s_hsearch(HS_GROUP, item, FIND))) {
         return found_item->data == YES? 1: 0;
     }
 
diff --git a/super.c b/super.c
index 0902702..abea061 100644
--- a/super.c
+++ b/super.c
@@ -900,7 +900,7 @@ char **arglist;
 char **envp;
 int n_builtin;
 {
-    char *s, *t, **p, **sp;
+    char  *t, **p, **sp;
     char *cdpath;
     int isglobal, j, iarg;
     ArgRangePat  *argpats, *arp;
@@ -1750,7 +1750,7 @@ rcl_umask()
 }
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Check if -r path matches actual path.
+/* Check if -r path matches actual path.                                   */
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 int
 check_rpath(r_path, xpath)