Change all short variables to unsigned int (looks like affected variables are always positive) and remove a cast to short
This commit is contained in:
@@ -79,7 +79,7 @@ struct tag {
|
||||
/* location of fulltext of algorithm in source file */
|
||||
struct FullText {
|
||||
char *filename;
|
||||
short start, end;
|
||||
unsigned int start, end;
|
||||
};
|
||||
|
||||
/* 'parameters' are lists of lists of (type) expressions */
|
||||
|
||||
@@ -133,12 +133,12 @@ typedef struct Hash_Table_ {
|
||||
#if 0
|
||||
int in_use; /* If someone is traversing the hash table */
|
||||
#endif
|
||||
short p; /* Next bucket to be split */
|
||||
short maxp; /* upper bound on p during expansion */
|
||||
unsigned int p; /* Next bucket to be split */
|
||||
unsigned int maxp; /* upper bound on p during expansion */
|
||||
long KeyCount; /* current # keys */
|
||||
short SegmentCount; /* current # segments */
|
||||
short MinLoadFactor;
|
||||
short MaxLoadFactor;
|
||||
unsigned int SegmentCount; /* current # segments */
|
||||
unsigned int MinLoadFactor;
|
||||
unsigned int MaxLoadFactor;
|
||||
Segment Directory[DIRECTORY_SIZE];
|
||||
} *Hash_Table;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ typedef struct Symbol_ Symbol;
|
||||
struct Symbol_ {
|
||||
char *name;
|
||||
char *filename;
|
||||
short line;
|
||||
unsigned int line;
|
||||
char resolved;
|
||||
};
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ HASHcreate(unsigned count)
|
||||
count = DIV(i, SEGMENT_SIZE);
|
||||
|
||||
table = (Hash_TableP) HASH_Table_new();
|
||||
table->SegmentCount = table->p = (short) (table->KeyCount = 0);
|
||||
table->SegmentCount = table->p = table->KeyCount = 0;
|
||||
/*
|
||||
** First initialize directory to 0\'s
|
||||
** DIRECTORY_SIZE must be same as in header
|
||||
|
||||
Reference in New Issue
Block a user