Clean up nwdbm, nwroute and trustee warnings
This commit is contained in:
29
src/nwdbm.c
29
src/nwdbm.c
@@ -1800,7 +1800,7 @@ static void add_pr_queue(uint32 q_id,
|
||||
|
||||
if (!q_directory || !*q_directory) {
|
||||
q_directory=buf;
|
||||
sprintf(q_directory, "SYS:SYSTEM/%08lX.QDR", q_id);
|
||||
sprintf(q_directory, "SYS:SYSTEM/%08X.QDR", q_id);
|
||||
}
|
||||
XDPRINTF((2,0, "ADD Q=%s, V=%s, C=%s", q_name, q_directory, q_command));
|
||||
nw_new_obj_prop(q_id, NULL, 0, 0, 0,
|
||||
@@ -2001,7 +2001,7 @@ static uint8 *test_add_dir(uint8 *unixname, uint8 *pp, int flags,
|
||||
else {
|
||||
chmod(unixname, permiss);
|
||||
if (uid >-1 && gid > -1)
|
||||
chown(unixname, uid, gid);
|
||||
(void)chown(unixname, uid, gid);
|
||||
XDPRINTF((1, 0, "Created dir '%s'", unixname));
|
||||
}
|
||||
} else {
|
||||
@@ -2018,7 +2018,7 @@ static uint8 *test_add_dir(uint8 *unixname, uint8 *pp, int flags,
|
||||
if (flags&2) {
|
||||
chmod(unixname, permiss);
|
||||
if (uid >-1 && gid > -1)
|
||||
chown(unixname, uid, gid);
|
||||
(void)chown(unixname, uid, gid);
|
||||
}
|
||||
}
|
||||
if (flags&1) {
|
||||
@@ -2108,7 +2108,7 @@ static void correct_user_dirs(uint32 objid, uint8 *objname, int uid, int gid)
|
||||
else
|
||||
downstr(p1+5);
|
||||
unlink(fndir);
|
||||
symlink(buf1, fndir);
|
||||
(void)symlink(buf1, fndir);
|
||||
}
|
||||
|
||||
void test_ins_unx_user(uint32 id)
|
||||
@@ -2185,8 +2185,9 @@ static void check_compress_bindery()
|
||||
NETOBJ *obj=(NETOBJ*)data.dptr;
|
||||
if (NULL == bsearch(&obj->id, objs,
|
||||
(size_t)ocount, (size_t)sizeof(uint32), cmp_uint32)) {
|
||||
errorp(10, errstr, "bsearch failed at id 0x%lx.",
|
||||
(unsigned long)obj->id);
|
||||
errorp(10, errstr, "bsearch failed at id 0x%x.",
|
||||
obj->id);
|
||||
|
||||
dbmclose();
|
||||
return;
|
||||
}
|
||||
@@ -2207,7 +2208,7 @@ static void check_compress_bindery()
|
||||
NETPROP *prop=(NETPROP*)data.dptr;
|
||||
if (NULL == bsearch(&prop->obj_id, objs,
|
||||
(size_t)ocount, (size_t)sizeof(uint32), cmp_uint32)) {
|
||||
XDPRINTF((1,0, "will delete property %s for obj_id 0x%lx",
|
||||
XDPRINTF((1,0, "will delete property %s for obj_id 0x%x",
|
||||
prop->name, prop->obj_id));
|
||||
if (d_pcount == LOC_MAX_OBJS) break;
|
||||
d_prop_oid[d_pcount] = prop->obj_id;
|
||||
@@ -3049,7 +3050,7 @@ static void bcreate_obj(uint32 id, char *name, int type,
|
||||
|
||||
/* 1/mstover -> ../id/1/2/3/4 */
|
||||
slprintf(buf1,sizeof(buf1)-1, "../id/%s", id_buf);
|
||||
symlink(buf1, buf);
|
||||
(void)symlink(buf1, buf);
|
||||
|
||||
/* id/1/2/3/4 creat */
|
||||
len = slprintf(buf, sizeof(buf)-2,"%s/id/%s", path_bindery, id_buf);
|
||||
@@ -3062,17 +3063,17 @@ static void bcreate_obj(uint32 id, char *name, int type,
|
||||
strmaxcpy(buf+len, "name.o", sizeof(buf)-1-len);
|
||||
strmaxcpy(buf1, name, sizeof(buf1)-1);
|
||||
downstr(buf1);
|
||||
symlink(buf1, buf);
|
||||
(void)symlink(buf1, buf);
|
||||
|
||||
/* typ -> 1 */
|
||||
strmaxcpy(buf+len, "typ.o", sizeof(buf)-1-len);
|
||||
slprintf(buf1, sizeof(buf1)-1,"%x", type);
|
||||
symlink(buf1, buf);
|
||||
(void)symlink(buf1, buf);
|
||||
|
||||
/* flags & security */
|
||||
strmaxcpy(buf+len, "f+s.o", sizeof(buf)-1-len);
|
||||
slprintf(buf1, sizeof(buf1)-1,"%02x%02x", flags&0xff, security&0xff);
|
||||
symlink(buf1, buf);
|
||||
(void)symlink(buf1, buf);
|
||||
|
||||
}
|
||||
|
||||
@@ -3117,7 +3118,7 @@ static void bcreate_prop(uint32 id, int prop_id, char *name,
|
||||
/* id.p -> name */
|
||||
slprintf(buf1,sizeof(buf1)-1, "%s", name);
|
||||
downstr(buf1);
|
||||
symlink(buf1, buf);
|
||||
(void)symlink(buf1, buf);
|
||||
|
||||
|
||||
/* x/name creat */
|
||||
@@ -3131,7 +3132,7 @@ static void bcreate_prop(uint32 id, int prop_id, char *name,
|
||||
/* flags & security */
|
||||
strmaxcpy(buf+len, "f+s", sizeof(buf)-1-len);
|
||||
slprintf(buf1, sizeof(buf1)-1,"%02x%02x", propflags&0xff, propsecurity&0xff);
|
||||
symlink(buf1, buf);
|
||||
(void)symlink(buf1, buf);
|
||||
|
||||
}
|
||||
|
||||
@@ -3180,7 +3181,7 @@ static void bcreate_val(uint32 id, int prop_id, int segment,
|
||||
sprintf(p1, "%02x", (int) *p++);
|
||||
p1+=2;
|
||||
}
|
||||
symlink(buf1, buf);
|
||||
(void)symlink(buf1, buf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user