Fix build warnings (without -Wall).
This commit is contained in:
parent
d70d390732
commit
dc83dd6422
9 changed files with 29 additions and 22 deletions
|
@ -123,7 +123,7 @@ void FDECL1(get_torito_desc, struct eltorito_boot_descriptor *, boot_desc)
|
||||||
unsigned char * checksum_ptr;
|
unsigned char * checksum_ptr;
|
||||||
struct directory_entry * de;
|
struct directory_entry * de;
|
||||||
struct directory_entry * de2;
|
struct directory_entry * de2;
|
||||||
int i;
|
unsigned int i;
|
||||||
int nsectors;
|
int nsectors;
|
||||||
|
|
||||||
memset(boot_desc, 0, sizeof(*boot_desc));
|
memset(boot_desc, 0, sizeof(*boot_desc));
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
|
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
|
||||||
before changing it!
|
before changing it!
|
||||||
|
|
||||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95
|
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 2009
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of the libiberty library. This library is free
|
This file is part of the libiberty library. This library is free
|
||||||
software; you can redistribute it and/or modify it under the
|
software; you can redistribute it and/or modify it under the
|
||||||
terms of the GNU General Public License as published by the
|
terms of the GNU General Public License as published by the
|
||||||
Free Software Foundation; either version 2, or (at your option)
|
Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
This library is distributed in the hope that it will be useful,
|
||||||
|
@ -53,6 +53,7 @@ the executable file might be covered by the GNU General Public License. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||||
actually compiling the library itself. This code is part of the GNU C
|
actually compiling the library itself. This code is part of the GNU C
|
||||||
|
@ -498,7 +499,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||||
for (p = longopts, option_index = 0; p->name; p++, option_index++)
|
for (p = longopts, option_index = 0; p->name; p++, option_index++)
|
||||||
if (!strncmp (p->name, nextchar, nameend - nextchar))
|
if (!strncmp (p->name, nextchar, nameend - nextchar))
|
||||||
{
|
{
|
||||||
if (nameend - nextchar == strlen (p->name))
|
assert (nameend > nextchar);
|
||||||
|
if (nameend == strlen (p->name) + nextchar)
|
||||||
{
|
{
|
||||||
/* Exact match found. */
|
/* Exact match found. */
|
||||||
pfound = p;
|
pfound = p;
|
||||||
|
|
|
@ -77,7 +77,7 @@ static char rcsid[] ="$Id: joliet.c,v 1.14 1999/03/07 17:41:19 eric Exp $";
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
static int jpath_table_index;
|
static unsigned int jpath_table_index;
|
||||||
static struct directory ** jpathlist;
|
static struct directory ** jpathlist;
|
||||||
static int next_jpath_index = 1;
|
static int next_jpath_index = 1;
|
||||||
static int sort_goof;
|
static int sort_goof;
|
||||||
|
|
|
@ -98,7 +98,7 @@ char * fn;
|
||||||
|
|
||||||
int i_ishidden()
|
int i_ishidden()
|
||||||
{
|
{
|
||||||
return((int)i_mat[0]);
|
return (i_mat[0] != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Joliet hide */
|
/* Joliet hide */
|
||||||
|
@ -142,6 +142,6 @@ char * fn;
|
||||||
|
|
||||||
int j_ishidden()
|
int j_ishidden()
|
||||||
{
|
{
|
||||||
return((int)j_mat[0]);
|
return (j_mat[0] != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ int volume_sequence_number = 1;
|
||||||
int omit_period = 0; /* Violates iso9660, but these are a pain */
|
int omit_period = 0; /* Violates iso9660, but these are a pain */
|
||||||
int transparent_compression = 0; /* So far only works with linux */
|
int transparent_compression = 0; /* So far only works with linux */
|
||||||
int omit_version_number = 0; /* May violate iso9660, but noone uses vers*/
|
int omit_version_number = 0; /* May violate iso9660, but noone uses vers*/
|
||||||
int RR_relocation_depth = 6; /* Violates iso9660, but most systems work */
|
unsigned int RR_relocation_depth = 6; /* Violates iso9660, but most systems work */
|
||||||
int full_iso9660_filenames = 0; /* Used with Amiga. Disc will not work with
|
int full_iso9660_filenames = 0; /* Used with Amiga. Disc will not work with
|
||||||
DOS */
|
DOS */
|
||||||
int allow_leading_dots = 0; /* DOS cannot read names with leading dots */
|
int allow_leading_dots = 0; /* DOS cannot read names with leading dots */
|
||||||
|
@ -461,7 +461,7 @@ void usage(){
|
||||||
[-x path -x path ...] path\n");
|
[-x path -x path ...] path\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int i;
|
unsigned int i;
|
||||||
/* const char **targets, **pp;*/
|
/* const char **targets, **pp;*/
|
||||||
|
|
||||||
fprintf (stderr, "Usage: %s [options] file...\n", program_name);
|
fprintf (stderr, "Usage: %s [options] file...\n", program_name);
|
||||||
|
@ -473,7 +473,7 @@ void usage(){
|
||||||
{
|
{
|
||||||
int comma;
|
int comma;
|
||||||
int len;
|
int len;
|
||||||
int j;
|
unsigned int j;
|
||||||
|
|
||||||
fprintf (stderr, " ");
|
fprintf (stderr, " ");
|
||||||
|
|
||||||
|
@ -641,7 +641,8 @@ int FDECL2(main, int, argc, char **, argv){
|
||||||
the ordering of the two. We describe each non-option ARGV-element
|
the ordering of the two. We describe each non-option ARGV-element
|
||||||
as if it were the argument of an option with character code 1. */
|
as if it were the argument of an option with character code 1. */
|
||||||
{
|
{
|
||||||
int i, is, il;
|
unsigned int i;
|
||||||
|
int is, il;
|
||||||
shortopts[0] = '-';
|
shortopts[0] = '-';
|
||||||
is = 1;
|
is = 1;
|
||||||
il = 0;
|
il = 0;
|
||||||
|
|
|
@ -277,7 +277,7 @@ extern int split_output;
|
||||||
extern int omit_period;
|
extern int omit_period;
|
||||||
extern int omit_version_number;
|
extern int omit_version_number;
|
||||||
extern int transparent_compression;
|
extern int transparent_compression;
|
||||||
extern int RR_relocation_depth;
|
extern unsigned int RR_relocation_depth;
|
||||||
extern int full_iso9660_filenames;
|
extern int full_iso9660_filenames;
|
||||||
extern int split_SL_component;
|
extern int split_SL_component;
|
||||||
extern int split_SL_field;
|
extern int split_SL_field;
|
||||||
|
|
|
@ -5,9 +5,11 @@
|
||||||
|
|
||||||
Copyright 1993 Yggdrasil Computing, Incorporated
|
Copyright 1993 Yggdrasil Computing, Incorporated
|
||||||
|
|
||||||
|
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
|
@ -16,7 +18,7 @@
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
static char rcsid[] ="$Id: rock.c,v 1.8 1999/03/02 03:41:26 eric Exp $";
|
static char rcsid[] ="$Id: rock.c,v 1.8 1999/03/02 03:41:26 eric Exp $";
|
||||||
|
@ -86,7 +88,7 @@ static char rcsid[] ="$Id: rock.c,v 1.8 1999/03/02 03:41:26 eric Exp $";
|
||||||
a CE entry for the continuation record */
|
a CE entry for the continuation record */
|
||||||
|
|
||||||
#define MAYBE_ADD_CE_ENTRY(BYTES) \
|
#define MAYBE_ADD_CE_ENTRY(BYTES) \
|
||||||
(BYTES + CE_SIZE + currlen + (ipnt - recstart) > reclimit ? 1 : 0)
|
((unsigned) ((BYTES) + CE_SIZE + currlen + ipnt) > (unsigned) (recstart + reclimit) ? 1 : 0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Buffer to build RR attributes
|
* Buffer to build RR attributes
|
||||||
|
|
|
@ -107,9 +107,9 @@ static void DECL(delete_directory, (struct directory * parent, struct directory
|
||||||
|
|
||||||
extern int verbose;
|
extern int verbose;
|
||||||
|
|
||||||
struct stat fstatbuf = {0,}; /* We use this for the artificial entries we create */
|
struct stat fstatbuf; /* We use this for the artificial entries we create */
|
||||||
|
|
||||||
struct stat root_statbuf = {0, }; /* Stat buffer for root directory */
|
struct stat root_statbuf; /* Stat buffer for root directory */
|
||||||
|
|
||||||
struct directory * reloc_dir = NULL;
|
struct directory * reloc_dir = NULL;
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ static char rcsid[] ="$Id: write.c,v 1.21 1999/03/07 17:41:19 eric Exp $";
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -178,7 +179,7 @@ struct deferred_write
|
||||||
static struct deferred_write * dw_head = NULL, * dw_tail = NULL;
|
static struct deferred_write * dw_head = NULL, * dw_tail = NULL;
|
||||||
|
|
||||||
unsigned int last_extent_written =0;
|
unsigned int last_extent_written =0;
|
||||||
static int path_table_index;
|
static unsigned int path_table_index;
|
||||||
static time_t begun;
|
static time_t begun;
|
||||||
|
|
||||||
/* We recursively walk through all of the directories and assign extent
|
/* We recursively walk through all of the directories and assign extent
|
||||||
|
@ -239,7 +240,7 @@ static void FDECL3(write_one_file, char *, filename,
|
||||||
char buffer[SECTOR_SIZE * NSECT];
|
char buffer[SECTOR_SIZE * NSECT];
|
||||||
FILE * infile;
|
FILE * infile;
|
||||||
int remain;
|
int remain;
|
||||||
int use;
|
unsigned int use;
|
||||||
|
|
||||||
|
|
||||||
if ((infile = fopen(filename, "rb")) == NULL)
|
if ((infile = fopen(filename, "rb")) == NULL)
|
||||||
|
@ -1163,7 +1164,8 @@ static int FDECL1(file_write, FILE *, outfile)
|
||||||
/*
|
/*
|
||||||
* Hard links throw us off here
|
* Hard links throw us off here
|
||||||
*/
|
*/
|
||||||
if(should_write != last_extent - session_start)
|
assert (last_extent > session_start);
|
||||||
|
if(should_write + session_start != last_extent)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"Number of extents written not what was predicted. Please fix.\n");
|
fprintf(stderr,"Number of extents written not what was predicted. Please fix.\n");
|
||||||
fprintf(stderr,"Predicted = %d, written = %d\n", should_write, last_extent);
|
fprintf(stderr,"Predicted = %d, written = %d\n", should_write, last_extent);
|
||||||
|
|
Loading…
Reference in a new issue