8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:43:03 +01:00

Bugfix for modify_relation and removing unused variables.

This commit is contained in:
tamlin 2002-11-21 20:43:58 +00:00
parent d60a7e799e
commit 83c6f43cd7
2 changed files with 15 additions and 33 deletions

View File

@ -388,9 +388,8 @@ void EXE_drop_database( DBB dbb)
* its files. * its files.
* *
**************************************/ **************************************/
STATUS status_vector[ISC_STATUS_LENGTH];
FIL file; FIL file;
SYM string;
TEXT dpb[128], *d, *p; TEXT dpb[128], *d, *p;
USHORT dpb_length; USHORT dpb_length;
SLONG log, part_offset; SLONG log, part_offset;
@ -984,8 +983,6 @@ static void add_field( FLD field)
**************************************/ **************************************/
DUDLEY_REL relation; DUDLEY_REL relation;
SYM source; SYM source;
STATUS status_vector[ISC_STATUS_LENGTH];
SLONG *blob;
relation = field->fld_relation; relation = field->fld_relation;
if (!(source = field->fld_source)) if (!(source = field->fld_source))
@ -1260,8 +1257,6 @@ static void add_global_field( FLD field)
**************************************/ **************************************/
SYM name; SYM name;
DSC desc; DSC desc;
STATUS status_vector[ISC_STATUS_LENGTH];
SLONG *blob;
name = field->fld_name; name = field->fld_name;
@ -1365,10 +1360,7 @@ static void add_index( DUDLEY_IDX index)
* *
**************************************/ **************************************/
SYM *symbol; SYM *symbol;
TEXT s[128];
USHORT i, size, error, if_any; USHORT i, size, error, if_any;
STATUS status_vector[ISC_STATUS_LENGTH];
SLONG *blob;
FLD field; FLD field;
error = if_any = FALSE; error = if_any = FALSE;
@ -2872,8 +2864,6 @@ static void get_global_fields(void)
**************************************/ **************************************/
FLD field; FLD field;
SYM symbol; SYM symbol;
USHORT l;
TEXT *p, *q;
FOR X IN RDB$FIELDS FOR X IN RDB$FIELDS
field = (FLD) DDL_alloc(FLD_LEN); field = (FLD) DDL_alloc(FLD_LEN);
@ -3027,8 +3017,6 @@ static void get_relations( DBB database)
DUDLEY_REL relation; DUDLEY_REL relation;
FLD field; FLD field;
SYM symbol; SYM symbol;
USHORT l;
TEXT *p, *q;
FOR R IN RDB$RELATIONS FOR R IN RDB$RELATIONS
relation = (DUDLEY_REL) DDL_alloc(REL_LEN); relation = (DUDLEY_REL) DDL_alloc(REL_LEN);
@ -3168,8 +3156,6 @@ static void get_triggers( DBB database)
**************************************/ **************************************/
DUDLEY_TRG trigger; DUDLEY_TRG trigger;
SYM symbol, rel_name; SYM symbol, rel_name;
USHORT l;
TEXT *p, *q;
FOR T IN RDB$TRIGGERS WITH T.RDB$SYSTEM_FLAG MISSING OR FOR T IN RDB$TRIGGERS WITH T.RDB$SYSTEM_FLAG MISSING OR
T.RDB$SYSTEM_FLAG = 0 T.RDB$SYSTEM_FLAG = 0
@ -3241,9 +3227,7 @@ static void make_desc( DUDLEY_NOD node, DSC * desc)
* *
**************************************/ **************************************/
FLD field; FLD field;
DUDLEY_REL relation;
DSC desc1, desc2; DSC desc1, desc2;
DUDLEY_CTX context;
CON constant; CON constant;
FUNC function; FUNC function;
USHORT dtype; USHORT dtype;
@ -3543,7 +3527,6 @@ static void modify_field( FLD field)
* *
**************************************/ **************************************/
SYM name; SYM name;
TEXT *p;
USHORT if_any; USHORT if_any;
DUDLEY_REL relation; DUDLEY_REL relation;
@ -3618,7 +3601,6 @@ static void modify_global_field( FLD field)
* *
**************************************/ **************************************/
SYM name; SYM name;
TEXT *p;
USHORT if_any; USHORT if_any;
name = field->fld_name; name = field->fld_name;
@ -3766,11 +3748,11 @@ static void modify_relation( DUDLEY_REL relation)
* *
**************************************/ **************************************/
SYM name; SYM name;
TEXT *p;
USHORT if_any; USHORT if_any;
if (!relation->rel_flags & rel_marked_for_modify) if (!(relation->rel_flags & rel_marked_for_modify)) {
return; return;
}
name = relation->rel_name; name = relation->rel_name;
if_any = FALSE; if_any = FALSE;
@ -4079,7 +4061,7 @@ static void store_acl( SCL scl_class, SLONG * blob_id)
* Generate and store an access control list. * Generate and store an access control list.
* *
**************************************/ **************************************/
TEXT buffer[4096], *p; TEXT buffer[4096];
USHORT length; USHORT length;
STATUS status_vector[ISC_STATUS_LENGTH]; STATUS status_vector[ISC_STATUS_LENGTH];
void *blob; void *blob;
@ -4113,7 +4095,7 @@ static void store_blr( DUDLEY_NOD node, SLONG * blob_id, DUDLEY_REL relation)
* *
**************************************/ **************************************/
struct str blr; struct str blr;
USHORT length, base; USHORT length;
STATUS status_vector[ISC_STATUS_LENGTH]; STATUS status_vector[ISC_STATUS_LENGTH];
void *handle; void *handle;
@ -4159,12 +4141,12 @@ static void store_query_header( DUDLEY_NOD node, SLONG * blob_id)
STATUS status_vector[ISC_STATUS_LENGTH]; STATUS status_vector[ISC_STATUS_LENGTH];
void *blob; void *blob;
USHORT bpb_length; USHORT bpb_length;
UCHAR bpb[20], *p; UCHAR bpb[20];
#if (defined JPN_EUC || defined JPN_SJIS) #if (defined JPN_EUC || defined JPN_SJIS)
/* always create bpb since query header is a text blob */ /* always create bpb since query header is a text blob */
p = bpb; UCHAR* p = bpb;
*p++ = gds__bpb_version1; *p++ = gds__bpb_version1;
*p++ = gds__bpb_source_interp; *p++ = gds__bpb_source_interp;
*p++ = 2; *p++ = 2;
@ -4240,15 +4222,15 @@ static void store_text( TXT text, SLONG * blob_id)
* BLR expression in a blob. * BLR expression in a blob.
* *
**************************************/ **************************************/
STATUS status_vector[ISC_STATUS_LENGTH];
void *blob; void *blob;
USHORT bpb_length; USHORT bpb_length;
UCHAR bpb[20], *p; UCHAR bpb[20];
#if (defined JPN_EUC || defined JPN_SJIS) #if (defined JPN_EUC || defined JPN_SJIS)
/* create bpb for text blob */ /* create bpb for text blob */
p = bpb; UCHAR* p = bpb;
*p++ = gds__bpb_version1; *p++ = gds__bpb_version1;
*p++ = gds__bpb_source_interp; *p++ = gds__bpb_source_interp;
*p++ = 2; *p++ = 2;

View File

@ -268,7 +268,7 @@ static void decompile_blr_literal(SCHAR * string)
* and write it to the output file. * and write it to the output file.
* *
**************************************/ **************************************/
SCHAR *p, *q, num_buffer[20], scale; SCHAR *p, scale;
TEXT *b, buffer[256]; TEXT *b, buffer[256];
SSHORT size; SSHORT size;
SLONG value; SLONG value;
@ -891,7 +891,7 @@ static void extract_func_args(TEXT * function_name)
* *
**************************************/ **************************************/
BOOLEAN first; BOOLEAN first;
TEXT s[32], *p; TEXT* p;
first = TRUE; first = TRUE;
p = ""; p = "";
@ -1455,7 +1455,8 @@ static void extract_trig_msgs(TEXT * trigger_name)
* *
**************************************/ **************************************/
BOOLEAN first; BOOLEAN first;
TEXT s[32], *p, quote_char; TEXT* p;
TEXT quote_char;
first = TRUE; first = TRUE;
p = " "; p = " ";
@ -2008,7 +2009,6 @@ static void set_capabilities(void)
* *
**************************************/ **************************************/
ULONG *req; ULONG *req;
STATUS status_vector[ISC_STATUS_LENGTH];
RFR_TAB rel_field_table; RFR_TAB rel_field_table;
req = NULL; req = NULL;
@ -2202,7 +2202,7 @@ static void wal_info(UCHAR * db_info_buffer,
* *
**************************************/ **************************************/
UCHAR item; UCHAR item;
UCHAR *d, *p; UCHAR* p;
SLONG length; SLONG length;
p = db_info_buffer; p = db_info_buffer;