diff options
author | Jeremy Katz <katzj@redhat.com> | 2005-06-13 19:09:23 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2005-06-13 19:09:23 +0000 |
commit | efd4daedfbe9d1cd0809f08c244c419231575436 (patch) | |
tree | 17e936613588a0ad9262c9dbfac3d21c3b7f96e9 /utils | |
parent | d6ddca580702b6c469f3952966a96bc54f4a0836 (diff) | |
download | anaconda-efd4daedfbe9d1cd0809f08c244c419231575436.tar.gz anaconda-efd4daedfbe9d1cd0809f08c244c419231575436.tar.xz anaconda-efd4daedfbe9d1cd0809f08c244c419231575436.zip |
2005-06-13 Jeremy Katz <katzj@redhat.com>
* Makefile Makefile.inc mini-wm.c xmouse.c xutils.c isys/Makefile
isys/isys.c isys/lang.c isys/smp.c isys/uncpio.c
isys/gzlib/Makefile isys/gzlib/inflate.c loader2/Makefile
loader2/driverdisk.c loader2/driverselect.c loader2/hdinstall.c
loader2/init.c loader2/kickstart.c loader2/loader.c
loader2/loadermisc.c loader2/moduleinfo.h loader2/modules.c
loader2/net.c loader2/nfsinstall.c loader2/telnet.c
loader2/undomounts.c loader2/urlinstall.c utils/Makefile
utils/genhdlist.c utils/mapshdr.c utils/snarffont.c: Define cflags
in one place (Makefile.inc) and use a consistent set
everywhere. Fix up some of the compile warnings this uncovered.
Also fix a few more things that -Wextra turned up.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Makefile | 2 | ||||
-rw-r--r-- | utils/genhdlist.c | 10 | ||||
-rw-r--r-- | utils/mapshdr.c | 6 | ||||
-rw-r--r-- | utils/snarffont.c | 12 |
4 files changed, 15 insertions, 15 deletions
diff --git a/utils/Makefile b/utils/Makefile index 93e06c9ae..bf0704c6e 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -7,7 +7,7 @@ ISYSLIB=isys LOADERDIR = ../loader2 LOADLIBES = -lpopt -CFLAGS = -Wall -g -I.. -I$(LOADERDIR) -Werror -D_FORTIFY_SOURCE=2 +CFLAGS += -I.. -I$(LOADERDIR) -fno-strict-aliasing RPMCFLAGS = $(CFLAGS) -I/usr/include/rpm LDFLAGS = -g diff --git a/utils/genhdlist.c b/utils/genhdlist.c index 3ad6f953b..3055d7c7e 100644 --- a/utils/genhdlist.c +++ b/utils/genhdlist.c @@ -170,7 +170,7 @@ int onePrePass(const char * dirName) { return 1; } - chdir(subdir); + if (chdir(subdir) == -1) abort(); errno = 0; ent = readdir(dir); @@ -227,7 +227,7 @@ int onePass(FD_t outfd, FD_t out2fd, const char * dirName, int cdNum, struct dirent * ent; char * subdir = strdup(dirName); int errno; - Header h, nh, h2; + Header h, nh, h2 = NULL; int rc; int_32 size; DIR * dir; @@ -237,7 +237,7 @@ int onePass(FD_t outfd, FD_t out2fd, const char * dirName, int cdNum, int order = -1; char ** newFileList, ** fileNames; uint_32 * newFileFlags, * fileFlags; - int newFileListCount; + int newFileListCount = 0; int marker = time(NULL); /* good enough counter; we'll increment it */ rpmts ts = rpmtsCreate(); rpmtsSetRootDir(ts, "/"); @@ -251,7 +251,7 @@ int onePass(FD_t outfd, FD_t out2fd, const char * dirName, int cdNum, return 1; } - chdir(subdir); + if (chdir(subdir) == -1) abort(); errno = 0; ent = readdir(dir); @@ -376,7 +376,7 @@ int onePass(FD_t outfd, FD_t out2fd, const char * dirName, int cdNum, if (headerGetEntry(h, RPMTAG_OLDFILENAMES, NULL, (void **) &fileNames, &fileCount)) { headerGetEntry(h, RPMTAG_FILEFLAGS, NULL, - (void **) &fileFlags, NULL); + (void **) &fileFlags, NULL); newFileList = malloc(sizeof(*newFileList) * fileCount); newFileFlags = malloc(sizeof(*newFileList) * fileCount); diff --git a/utils/mapshdr.c b/utils/mapshdr.c index 53f99b8c5..5a8d18f59 100644 --- a/utils/mapshdr.c +++ b/utils/mapshdr.c @@ -10,13 +10,13 @@ int main(int argc, char ** argv) { struct kmapHeader h; struct kmapInfo info; - int i; + int i, x; struct stat sb; char * chptr; h.magic = KMAP_MAGIC; h.numEntries = argc - 1; - write(1, &h, sizeof(h)); + x = write(1, &h, sizeof(h)); for (i = 1; i < argc; i++) { if (stat(argv[i], &sb)) { @@ -33,7 +33,7 @@ int main(int argc, char ** argv) { *chptr = '\0'; info.size = sb.st_size; - write(1, &info, sizeof(info)); + x = write(1, &info, sizeof(info)); } return 0; diff --git a/utils/snarffont.c b/utils/snarffont.c index d6597526c..eaff9ccf9 100644 --- a/utils/snarffont.c +++ b/utils/snarffont.c @@ -19,7 +19,7 @@ int main(void) { unsigned short map[E_TABSZ]; struct unipair descs[2048]; struct unimapdesc d; - int fd; + int fd, i; if ((fd = open("/dev/tty0", O_RDONLY)) < 0) die("open"); @@ -41,10 +41,10 @@ int main(void) { if (ioctl(fd, GIO_UNIMAP, &d)) die("GIO_UNIMAP"); - write(1, &cfo, sizeof(cfo)); - write(1, buf, sizeof(buf)); - write(1, map, sizeof(map)); - write(1, &d.entry_ct, sizeof(d.entry_ct)); - write(1, descs, d.entry_ct * sizeof(descs[0])); + i = write(1, &cfo, sizeof(cfo)); + i = write(1, buf, sizeof(buf)); + i = write(1, map, sizeof(map)); + i = write(1, &d.entry_ct, sizeof(d.entry_ct)); + i = write(1, descs, d.entry_ct * sizeof(descs[0])); return 0; } |