makefs: clean up warnings
- make functions and variables static where appropriate - use const char * where appropriate - remove unused variables Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
c36036beff
commit
9e96f90b50
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317746
@ -1498,7 +1498,7 @@ cd9660_free_structure(cd9660node *root)
|
||||
* instead of having the TAILQ_ENTRY as part of the cd9660node,
|
||||
* just create a temporary structure
|
||||
*/
|
||||
struct ptq_entry
|
||||
static struct ptq_entry
|
||||
{
|
||||
TAILQ_ENTRY(ptq_entry) ptq;
|
||||
cd9660node *node;
|
||||
|
@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "makefs.h"
|
||||
#include "buf.h"
|
||||
|
||||
TAILQ_HEAD(buftailhead,buf) buftail;
|
||||
static TAILQ_HEAD(buftailhead,buf) buftail;
|
||||
|
||||
int
|
||||
bread(struct vnode *vp, daddr_t blkno, int size, struct ucred *u1 __unused,
|
||||
|
@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define BBSIZE 8192 /* size of boot area, with label */
|
||||
#endif
|
||||
|
||||
static void initcg(int, time_t, const fsinfo_t *);
|
||||
static void initcg(uint32_t, time_t, const fsinfo_t *);
|
||||
static int ilog2(int);
|
||||
|
||||
static int count_digits(int);
|
||||
@ -78,23 +78,22 @@ static int count_digits(int);
|
||||
#define UMASK 0755
|
||||
#define POWEROF2(num) (((num) & ((num) - 1)) == 0)
|
||||
|
||||
union {
|
||||
static union {
|
||||
struct fs fs;
|
||||
char pad[SBLOCKSIZE];
|
||||
} fsun;
|
||||
#define sblock fsun.fs
|
||||
struct csum *fscs;
|
||||
|
||||
union {
|
||||
static union {
|
||||
struct cg cg;
|
||||
char pad[FFS_MAXBSIZE];
|
||||
} cgun;
|
||||
#define acg cgun.cg
|
||||
|
||||
char *iobuf;
|
||||
int iobufsize;
|
||||
static char *iobuf;
|
||||
static int iobufsize;
|
||||
|
||||
char writebuf[FFS_MAXBSIZE];
|
||||
static char writebuf[FFS_MAXBSIZE];
|
||||
|
||||
static int Oflag; /* format as an 4.3BSD file system */
|
||||
static int64_t fssize; /* file system size */
|
||||
@ -117,7 +116,8 @@ struct fs *
|
||||
ffs_mkfs(const char *fsys, const fsinfo_t *fsopts, time_t tstamp)
|
||||
{
|
||||
int fragsperinode, optimalfpg, origdensity, minfpg, lastminfpg;
|
||||
int32_t cylno, i, csfrags;
|
||||
int32_t csfrags;
|
||||
uint32_t i, cylno;
|
||||
long long sizepb;
|
||||
void *space;
|
||||
int size;
|
||||
@ -537,7 +537,8 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts, time_t tstamp)
|
||||
void
|
||||
ffs_write_superblock(struct fs *fs, const fsinfo_t *fsopts)
|
||||
{
|
||||
int cylno, size, blks, i, saveflag;
|
||||
int size, blks, i, saveflag;
|
||||
uint32_t cylno;
|
||||
void *space;
|
||||
char *wrbuf;
|
||||
|
||||
@ -579,10 +580,11 @@ ffs_write_superblock(struct fs *fs, const fsinfo_t *fsopts)
|
||||
* Initialize a cylinder group.
|
||||
*/
|
||||
static void
|
||||
initcg(int cylno, time_t utime, const fsinfo_t *fsopts)
|
||||
initcg(uint32_t cylno, time_t utime, const fsinfo_t *fsopts)
|
||||
{
|
||||
daddr_t cbase, dmax;
|
||||
int32_t i, j, d, dlower, dupper, blkno;
|
||||
int32_t blkno;
|
||||
uint32_t i, j, d, dlower, dupper;
|
||||
struct ufs1_dinode *dp1;
|
||||
struct ufs2_dinode *dp2;
|
||||
int start;
|
||||
@ -643,7 +645,7 @@ initcg(int cylno, time_t utime, const fsinfo_t *fsopts)
|
||||
acg.cg_nextfreeoff = acg.cg_clusteroff +
|
||||
howmany(fragstoblks(&sblock, sblock.fs_fpg), CHAR_BIT);
|
||||
}
|
||||
if (acg.cg_nextfreeoff > sblock.fs_cgsize) {
|
||||
if (acg.cg_nextfreeoff > (uint32_t)sblock.fs_cgsize) {
|
||||
printf("Panic: cylinder group too big\n");
|
||||
exit(37);
|
||||
}
|
||||
|
@ -95,8 +95,8 @@ main(int argc, char *argv[])
|
||||
fsinfo_t fsoptions;
|
||||
fsnode *root;
|
||||
int ch, i, len;
|
||||
char *subtree;
|
||||
char *specfile;
|
||||
const char *subtree;
|
||||
const char *specfile;
|
||||
|
||||
setprogname(argv[0]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user