Avoid compiler casting warnings Part 2
This saves instructions that are related to casting as well as compiler warnings.
This commit is contained in:
@@ -90,7 +90,7 @@ mktemp_internal(int dfd, char *path, int slen, int mode, int flags)
|
||||
cp = start;
|
||||
do {
|
||||
unsigned short rbuf[16];
|
||||
unsigned int i;
|
||||
size_t i;
|
||||
|
||||
/*
|
||||
* Avoid lots of arc4random() calls by using
|
||||
|
@@ -201,5 +201,5 @@ main(int argc, char *argv[])
|
||||
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||
}
|
||||
|
||||
exit(errors);
|
||||
return errors;
|
||||
}
|
||||
|
@@ -304,7 +304,8 @@ sudo_debug_register_v2(const char *program, const char *const subsystems[],
|
||||
}
|
||||
|
||||
if (instance == NULL) {
|
||||
unsigned int i, j, max_id = NUM_DEF_SUBSYSTEMS - 1;
|
||||
size_t i;
|
||||
unsigned int j, max_id = NUM_DEF_SUBSYSTEMS - 1;
|
||||
|
||||
/* Fill in subsystem name -> id mapping as needed. */
|
||||
if (ids != NULL) {
|
||||
@@ -348,7 +349,7 @@ sudo_debug_register_v2(const char *program, const char *const subsystems[],
|
||||
} else {
|
||||
/* Check for matching instance but different ids[]. */
|
||||
if (ids != NULL && instance->subsystem_ids != ids) {
|
||||
unsigned int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; subsystems[i] != NULL; i++)
|
||||
ids[i] = instance->subsystem_ids[i];
|
||||
|
@@ -121,7 +121,7 @@ sudo_ttyname_scan(const char *dir, dev_t rdev, char *name, size_t namelen)
|
||||
char *ret = NULL;
|
||||
struct dirent *dp;
|
||||
struct stat sb;
|
||||
unsigned int i;
|
||||
size_t i;
|
||||
DIR *d = NULL;
|
||||
debug_decl(sudo_ttyname_scan, SUDO_DEBUG_UTIL);
|
||||
|
||||
|
Reference in New Issue
Block a user