8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 04:43:03 +01:00
This commit is contained in:
robocop 2013-05-21 21:46:28 +00:00
parent 96875db92e
commit 99c21b988d
12 changed files with 28 additions and 26 deletions

View File

@ -38,7 +38,7 @@ public:
{ }
template <typename T>
static bool checkType(unsigned t, unsigned sz)
static bool checkType(unsigned t, unsigned /*sz*/)
{
return T::unknownDataType();
}

View File

@ -35,7 +35,7 @@
// This setting of maximum dpb size doesn't mean, that we
// can't process larger DBPs! This is just recommended limit
// cause it's hard to imagine sensefull DPB of even this size.
const size_t MAX_DPB_SIZE = 1024*1024;
const size_t MAX_DPB_SIZE = 1024 * 1024;
namespace Firebird {

View File

@ -94,11 +94,13 @@ public:
}
void unblockWaiting()
{
if (blockedWriters.value()) {
if (blockedWriters.value())
{
if (!SetEvent(writers_event))
system_call_failed::raise("SetEvent");
}
else if (blockedReaders) {
else if (blockedReaders)
{
MutexLockGuard guard(blockedReadersLock, "RWLock::unblockWaiting");
if (blockedReaders && !ReleaseSemaphore(readers_semaphore, blockedReaders, NULL))
{

View File

@ -78,7 +78,7 @@ public:
return defaultConfig;
}
bool missFirebirdConf()
bool missFirebirdConf() const
{
return missConf;
}

View File

@ -100,7 +100,7 @@ public:
return true;
}
bool active()
bool active() const
{
return file.hasData();
}

View File

@ -88,8 +88,8 @@ using namespace Firebird;
#define QUAD_MIN_real -9223372036854775808. // min decimal value of quad
#define QUAD_MAX_real 9223372036854775807. // max decimal value of quad
#define QUAD_MIN_int quad_min_int // min integer value of quad
#define QUAD_MAX_int quad_max_int // max integer value of quad
//#define QUAD_MIN_int quad_min_int // min integer value of quad
//#define QUAD_MAX_int quad_max_int // max integer value of quad
#ifdef FLT_MAX
#define FLOAT_MAX FLT_MAX // Approx. 3.4e38 max float (32 bit) value
@ -113,7 +113,7 @@ using namespace Firebird;
// NOTE: The syntax for the below line may need modification to ensure
// the result of 1 << 62 is a quad
#define QUAD_LIMIT ((((SINT64) 1) << 62) / 5)
//#define QUAD_LIMIT ((((SINT64) 1) << 62) / 5)
#define INT64_LIMIT ((((SINT64) 1) << 62) / 5)
#define TODAY "TODAY"
@ -143,13 +143,13 @@ static void localError(const Firebird::Arg::StatusVector&);
class DummyException {};
#ifndef WORDS_BIGENDIAN
static const SQUAD quad_min_int = { 0, SLONG_MIN };
static const SQUAD quad_max_int = { -1, SLONG_MAX };
#else
static const SQUAD quad_min_int = { SLONG_MIN, 0 };
static const SQUAD quad_max_int = { SLONG_MAX, -1 };
#endif
//#ifndef WORDS_BIGENDIAN
//static const SQUAD quad_min_int = { 0, SLONG_MIN };
//static const SQUAD quad_max_int = { -1, SLONG_MAX };
//#else
//static const SQUAD quad_min_int = { SLONG_MIN, 0 };
//static const SQUAD quad_max_int = { SLONG_MAX, -1 };
//#endif
static const double eps_double = 1e-14;

View File

@ -201,7 +201,7 @@ public:
enum LockMode {FLM_EXCLUSIVE, FLM_TRY_EXCLUSIVE, FLM_SHARED, FLM_TRY_SHARED};
typedef void InitFunction(int fd);
FileLock(const char* fileName, InitFunction* init = NULL); // main ctor
explicit FileLock(const char* fileName, InitFunction* init = NULL); // main ctor
FileLock(const FileLock* main, int s); // creates additional lock for existing file
~FileLock();

View File

@ -199,7 +199,7 @@ public:
class CountedFd
{
public:
CountedFd(int f)
explicit CountedFd(int f)
: fd(f), useCount(0)
{ }
@ -232,7 +232,7 @@ namespace {
class FileLockHolder
{
public:
FileLockHolder(FileLock* l)
explicit FileLockHolder(FileLock* l)
: lock(l)
{
Arg::StatusVector status;

View File

@ -10801,7 +10801,7 @@ dsc* UdfCallNode::execute(thread_db* tdbb, jrd_req* request) const
}
}
}
catch (const Exception& ex)
catch (const Exception&)
{
/*** TODO:
const bool noPriv = (ex.stuff_exception(tdbb->tdbb_status_vector) == isc_no_priv);

View File

@ -228,8 +228,8 @@ string Parser::makeParseStr(const Position& p1, const Position& p2)
if (DataTypeUtil::convertToUTF8(str, ret))
return ret;
else
return str;
return str;
}
@ -1022,7 +1022,7 @@ int Parser::yylexAux()
Firebird::string str(lex.last_token, 2);
KeywordVersion* keyVer = keywordsMap->get(str);
if (keyVer && keyVer && parser_version >= keyVer->version)
if (keyVer && parser_version >= keyVer->version)
{
++lex.ptr;
return keyVer->keyword;

View File

@ -861,7 +861,7 @@ public:
s(p, str)
{ }
IntlString(const Firebird::string& str, const Firebird::MetaName& cs = NULL)
explicit IntlString(const Firebird::string& str, const Firebird::MetaName& cs = NULL)
: charset(cs),
s(str)
{ }
@ -871,7 +871,7 @@ public:
s(p, o.s)
{ }
IntlString(Firebird::MemoryPool& p)
explicit IntlString(Firebird::MemoryPool& p)
: charset(p),
s(p)
{ }

View File

@ -964,7 +964,7 @@ RseNode* PASS1_derived_table(DsqlCompilerScratch* dsqlScratch, SelectExprNode* i
// Save some values to restore after rse process.
DsqlContextStack* const req_base = dsqlScratch->context;
string aliasRelationPrefix = dsqlScratch->aliasRelationPrefix;
const string aliasRelationPrefix = dsqlScratch->aliasRelationPrefix;
// Change context, because when we are processing the derived table rse
// it may not reference to other streams in the same scope_level.