From b60c0e4cab1d6aca1d8872e413e64d8bf5a9600f Mon Sep 17 00:00:00 2001 From: robocop Date: Sat, 21 Aug 2004 09:29:46 +0000 Subject: [PATCH] Misc: format --- src/gpre/jrdmet.cpp | 5 +++-- src/isql/isql.epp | 2 +- src/jrd/cch.cpp | 2 +- src/jrd/err.cpp | 6 ++++-- src/jrd/evl.cpp | 4 ++-- src/jrd/exe.cpp | 3 ++- src/jrd/ext.cpp | 2 +- src/jrd/opt.cpp | 13 ++++++------- 8 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/gpre/jrdmet.cpp b/src/gpre/jrdmet.cpp index ea8982b9e2..a139223644 100644 --- a/src/gpre/jrdmet.cpp +++ b/src/gpre/jrdmet.cpp @@ -26,7 +26,7 @@ // //____________________________________________________________ // -// $Id: jrdmet.cpp,v 1.18 2004-06-03 07:31:10 robocop Exp $ +// $Id: jrdmet.cpp,v 1.19 2004-08-21 09:21:08 robocop Exp $ // #include "firebird.h" @@ -81,7 +81,8 @@ void JRDMET_init( DBB db) field->fld_dtype = gfield->gfld_dtype; field->fld_sub_type = gfield->gfld_sub_type; if (field->fld_dtype == dtype_varying || - field->fld_dtype == dtype_text) { + field->fld_dtype == dtype_text) + { field->fld_dtype = dtype_cstring; field->fld_flags |= FLD_text; ++field->fld_length; diff --git a/src/isql/isql.epp b/src/isql/isql.epp index c116077612..54e7f9c202 100644 --- a/src/isql/isql.epp +++ b/src/isql/isql.epp @@ -2749,7 +2749,7 @@ static void do_isql() switch (ret) { case CONT: - if(process_statement(statement, global_sqldap) == ERR) + if (process_statement(statement, global_sqldap) == ERR) { Exit_value = FINI_ERROR; } diff --git a/src/jrd/cch.cpp b/src/jrd/cch.cpp index 600e58a7e8..bdb4e96bd6 100644 --- a/src/jrd/cch.cpp +++ b/src/jrd/cch.cpp @@ -2518,7 +2518,7 @@ bool CCH_write_all_shadows(thread_db* tdbb, and set up to release it in case of error */ spare_buffer = - (SLONG *) dbb->dbb_bufferpool->allocate((SLONG) dbb->dbb_page_size,0 + (SLONG*) dbb->dbb_bufferpool->allocate((SLONG) dbb->dbb_page_size, 0 #ifdef DEBUG_GDS_ALLOC ,__FILE__,__LINE__ #endif diff --git a/src/jrd/err.cpp b/src/jrd/err.cpp index cbbd6eb0a6..a87db20c58 100644 --- a/src/jrd/err.cpp +++ b/src/jrd/err.cpp @@ -409,7 +409,8 @@ void ERR_post_nothrow(ISC_STATUS status, ...) va_start(args, status); internal_post(status, args); -}; +} + void ERR_post(ISC_STATUS status, ...) /************************************** @@ -431,7 +432,8 @@ void ERR_post(ISC_STATUS status, ...) DEBUG; ERR_punt(); -}; +} + static void internal_post(ISC_STATUS status, va_list args) { diff --git a/src/jrd/evl.cpp b/src/jrd/evl.cpp index f62d559bc8..d0f49c4c9c 100644 --- a/src/jrd/evl.cpp +++ b/src/jrd/evl.cpp @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: evl.cpp,v 1.102 2004-08-17 17:52:18 dimitr Exp $ + * $Id: evl.cpp,v 1.103 2004-08-21 09:29:45 robocop Exp $ */ /* @@ -5084,7 +5084,7 @@ static dsc* internal_info(thread_db* tdbb, const dsc* value, impure_value* impur **************************************/ EVL_make_value(tdbb, value, impure); - internal_info_id id = + const internal_info_id id = *reinterpret_cast(impure->vlu_desc.dsc_address); switch (id) diff --git a/src/jrd/exe.cpp b/src/jrd/exe.cpp index 665889cf0b..8cc4fa7821 100644 --- a/src/jrd/exe.cpp +++ b/src/jrd/exe.cpp @@ -1787,6 +1787,7 @@ static void stuff_stack_trace(const jrd_req* request) ERR_post_nothrow(isc_random, isc_arg_string, ERR_cstring(sTrace), 0); } + static jrd_nod* looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node) { /************************************** @@ -3233,7 +3234,7 @@ static void release_blobs(thread_db* tdbb, jrd_req* request) /* Release blobs bound to this request */ if (request->req_blobs.getFirst()) do { - ULONG blob_temp_id = request->req_blobs.current(); + const ULONG blob_temp_id = request->req_blobs.current(); if (transaction->tra_blobs.locate(blob_temp_id)) { BlobIndex *current = &transaction->tra_blobs.current(); if (current->bli_materialized) diff --git a/src/jrd/ext.cpp b/src/jrd/ext.cpp index d9c8910e51..0b46843c13 100644 --- a/src/jrd/ext.cpp +++ b/src/jrd/ext.cpp @@ -401,7 +401,7 @@ if (opt->opt_count) */ - RecordSource* rsb = FB_NEW_RPT(*tdbb->getDefaultPool(),0) RecordSource; + RecordSource* rsb = FB_NEW_RPT(*tdbb->getDefaultPool(), 0) RecordSource; rsb->rsb_type = rsb_ext_sequential; const SSHORT size = sizeof(irsb); diff --git a/src/jrd/opt.cpp b/src/jrd/opt.cpp index e433c29f9d..7e1cdc945f 100644 --- a/src/jrd/opt.cpp +++ b/src/jrd/opt.cpp @@ -5282,7 +5282,7 @@ static RecordSource* gen_skip(thread_db* tdbb, OptimizerBlk* opt, rsb->rsb_count = 1; rsb->rsb_type = rsb_skip; rsb->rsb_next = prior_rsb; - rsb->rsb_arg [0] = (RecordSource*) node; + rsb->rsb_arg[0] = (RecordSource*) node; rsb->rsb_impure = CMP_impure (csb, sizeof (struct irsb_skip_n)); return rsb; @@ -6385,6 +6385,7 @@ static jrd_nod* make_missing(thread_db* tdbb, #ifdef EXPRESSION_INDICES if (idx->idx_flags & idx_expressn) { + fb_assert(idx->idx_expression != NULL); if (!expression_equal(tdbb, opt, idx, field, stream)) { return NULL; @@ -6470,6 +6471,7 @@ static jrd_nod* make_starts(thread_db* tdbb, #ifdef EXPRESSION_INDICES if (idx->idx_flags & idx_expressn) { + fb_assert(idx->idx_expression != NULL); if (!(expression_equal(tdbb, opt, idx, field, stream) && computable(opt->opt_csb, value, stream, true, false))) { @@ -6756,14 +6758,11 @@ static SSHORT match_index(thread_db* tdbb, for (OptimizerBlk::opt_segment* ptr = opt->opt_segments; i < idx->idx_count; i++, ptr++) { - if + if ( #ifdef EXPRESSION_INDICES - ((idx->idx_flags & idx_expressn) || -#endif - ((USHORT)(IPTR) match->nod_arg[e_fld_id] == idx->idx_rpt[i].idx_field) -#ifdef EXPRESSION_INDICES - ) + (idx->idx_flags & idx_expressn) || #endif + (USHORT)(IPTR) match->nod_arg[e_fld_id] == idx->idx_rpt[i].idx_field) { ++count; /* AB: If we have already an exact match don't