|
From: <ro...@us...> - 2013-12-29 00:35:54
|
Revision: 58985
http://sourceforge.net/p/firebird/code/58985
Author: robocop
Date: 2013-12-29 00:35:50 +0000 (Sun, 29 Dec 2013)
Log Message:
-----------
Misc and warnings.
Modified Paths:
--------------
firebird/trunk/builds/install/arch-specific/linux/README
firebird/trunk/examples/interfaces/01.create.cpp
firebird/trunk/src/burp/burp.cpp
firebird/trunk/src/common/MsgMetadata.h
firebird/trunk/src/common/StatementMetadata.h
firebird/trunk/src/common/classes/array.h
firebird/trunk/src/common/config/config.cpp
firebird/trunk/src/dsql/DdlNodes.h
firebird/trunk/src/dsql/Parser.h
firebird/trunk/src/iscguard/iscguard.cpp
firebird/trunk/src/isql/extract.epp
firebird/trunk/src/jrd/Attachment.cpp
firebird/trunk/src/jrd/Database.h
firebird/trunk/src/jrd/EngineInterface.h
firebird/trunk/src/jrd/ExtEngineManager.cpp
firebird/trunk/src/jrd/RecordSourceNodes.cpp
firebird/trunk/src/jrd/Routine.cpp
firebird/trunk/src/jrd/cch.cpp
firebird/trunk/src/jrd/jrd.cpp
firebird/trunk/src/jrd/met.epp
firebird/trunk/src/jrd/trace/TraceConfigStorage.h
firebird/trunk/src/utilities/gsec/gsec.cpp
firebird/trunk/src/yvalve/YObjects.h
Modified: firebird/trunk/builds/install/arch-specific/linux/README
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/README 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/builds/install/arch-specific/linux/README 2013-12-29 00:35:50 UTC (rev 58985)
@@ -1,4 +1,4 @@
-Firebird 2 Server for Linux
+Firebird 3 Server for Linux
More information can be found about the Firebird
Modified: firebird/trunk/examples/interfaces/01.create.cpp
===================================================================
--- firebird/trunk/examples/interfaces/01.create.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/examples/interfaces/01.create.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -76,7 +76,7 @@
try
{
// status vector and main dispatcher are returned by calls to IMaster functions
- // no error return may happen - this functions always succeed
+ // no error return may happen - these functions always succeed
st = master->getStatus();
prov = master->getDispatcher();
Modified: firebird/trunk/src/burp/burp.cpp
===================================================================
--- firebird/trunk/src/burp/burp.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/burp/burp.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -255,7 +255,7 @@
}
}
- Firebird::string* dbName = flag_restore ? &files[1] : &files[0];
+ const Firebird::string* dbName = flag_restore ? &files[1] : &files[0];
ISC_STATUS_ARRAY status;
FB_API_HANDLE svc_handle = 0;
Modified: firebird/trunk/src/common/MsgMetadata.h
===================================================================
--- firebird/trunk/src/common/MsgMetadata.h 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/common/MsgMetadata.h 2013-12-29 00:35:50 UTC (rev 58985)
@@ -96,7 +96,7 @@
{
}
- MsgMetadata(IMessageMetadata* from)
+ explicit MsgMetadata(IMessageMetadata* from)
: items(getPool()),
length(0)
{
@@ -246,7 +246,7 @@
class AttMetadata : public MsgMetadata
{
public:
- AttMetadata(IAttachment* att)
+ explicit AttMetadata(IAttachment* att)
: MsgMetadata(),
attachment(att)
{ }
Modified: firebird/trunk/src/common/StatementMetadata.h
===================================================================
--- firebird/trunk/src/common/StatementMetadata.h 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/common/StatementMetadata.h 2013-12-29 00:35:50 UTC (rev 58985)
@@ -43,7 +43,7 @@
class Parameters : public AttMetadata
{
public:
- Parameters(IAttachment* att)
+ explicit Parameters(IAttachment* att)
: AttMetadata(att),
fetched(false)
{
Modified: firebird/trunk/src/common/classes/array.h
===================================================================
--- firebird/trunk/src/common/classes/array.h 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/common/classes/array.h 2013-12-29 00:35:50 UTC (rev 58985)
@@ -559,15 +559,15 @@
static int compare(const void* a, const void* b)
{
- const Key& first(KeyOfValue::generate(*reinterpret_cast<const Value*>(a)));
- const Key& second(KeyOfValue::generate(*reinterpret_cast<const Value*>(b)));
+ const Key& first(KeyOfValue::generate(*static_cast<const Value*>(a)));
+ const Key& second(KeyOfValue::generate(*static_cast<const Value*>(b)));
if (Cmp::greaterThan(first, second))
return 1;
- else if (Cmp::greaterThan(second, first))
+ if (Cmp::greaterThan(second, first))
return -1;
- else
- return 0;
+
+ return 0;
}
};
Modified: firebird/trunk/src/common/config/config.cpp
===================================================================
--- firebird/trunk/src/common/config/config.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/common/config/config.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -716,10 +716,11 @@
Firebird::NoCaseString wireCrypt(wc);
if (wireCrypt == "DISABLED")
return WIRE_CRYPT_DISABLED;
- else if (wireCrypt == "ENABLED")
+ if (wireCrypt == "ENABLED")
return WIRE_CRYPT_ENABLED;
- else // the safest choice
- return WIRE_CRYPT_REQUIRED;
+
+ // the safest choice
+ return WIRE_CRYPT_REQUIRED;
}
bool Config::getRemoteAccess() const
Modified: firebird/trunk/src/dsql/DdlNodes.h
===================================================================
--- firebird/trunk/src/dsql/DdlNodes.h 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/dsql/DdlNodes.h 2013-12-29 00:35:50 UTC (rev 58985)
@@ -1830,7 +1830,7 @@
class Property : public PermanentStorage
{
public:
- Property(MemoryPool& p)
+ explicit Property(MemoryPool& p)
: PermanentStorage(p),
value(p)
{ }
Modified: firebird/trunk/src/dsql/Parser.h
===================================================================
--- firebird/trunk/src/dsql/Parser.h 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/dsql/Parser.h 2013-12-29 00:35:50 UTC (rev 58985)
@@ -210,13 +210,11 @@
BoolAsValueNode* node = value->as<BoolAsValueNode>();
if (node)
return node->boolean;
- else
- {
- ComparativeBoolNode* cmpNode = newNode<ComparativeBoolNode>(
- blr_eql, value, MAKE_constant("1", CONSTANT_BOOLEAN));
- cmpNode->dsqlWasValue = true;
- return cmpNode;
- }
+
+ ComparativeBoolNode* cmpNode = newNode<ComparativeBoolNode>(
+ blr_eql, value, MAKE_constant("1", CONSTANT_BOOLEAN));
+ cmpNode->dsqlWasValue = true;
+ return cmpNode;
}
void yyReducePosn(YYPOSN& ret, YYPOSN* termPosns, YYSTYPE* termVals,
Modified: firebird/trunk/src/iscguard/iscguard.cpp
===================================================================
--- firebird/trunk/src/iscguard/iscguard.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/iscguard/iscguard.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -1152,7 +1152,7 @@
tmp_buff, 0, 0, (LPTSTR) &lpMsgBuf, 0,
reinterpret_cast<va_list*>(act_buff));
- const int len = MIN(BUFF_SIZE-1, strlen(lpMsgBuf) - 1);
+ const int len = MIN(BUFF_SIZE - 1, strlen(lpMsgBuf) - 1);
strncpy(act_buff[0], lpMsgBuf, len);
act_buff[0][len] = 0;
LocalFree(lpMsgBuf);
Modified: firebird/trunk/src/isql/extract.epp
===================================================================
--- firebird/trunk/src/isql/extract.epp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/isql/extract.epp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -2549,8 +2549,8 @@
bool firstarg = true;
FOR FNA IN RDB$FUNCTION_ARGUMENTS WITH
- FUN.RDB$FUNCTION_NAME EQ FNA.RDB$FUNCTION_NAME AND
- FUN.RDB$PACKAGE_NAME MISSING
+ FUN.RDB$FUNCTION_NAME EQ FNA.RDB$FUNCTION_NAME
+ AND FUN.RDB$PACKAGE_NAME MISSING
SORTED BY FNA.RDB$ARGUMENT_POSITION
// Find parameter type
Modified: firebird/trunk/src/jrd/Attachment.cpp
===================================================================
--- firebird/trunk/src/jrd/Attachment.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/Attachment.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -560,7 +560,11 @@
}
}
-void Jrd::Attachment::SyncGuard::init(const char* f, bool optional)
+void Jrd::Attachment::SyncGuard::init(const char* f, bool
+#ifdef DEV_BUILD
+ optional
+#endif
+ )
{
fb_assert(optional || jAtt);
Modified: firebird/trunk/src/jrd/Database.h
===================================================================
--- firebird/trunk/src/jrd/Database.h 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/Database.h 2013-12-29 00:35:50 UTC (rev 58985)
@@ -304,7 +304,7 @@
class Linger FB_FINAL : public Firebird::RefCntIface<Firebird::ITimer, FB_TIMER_VERSION>
{
public:
- Linger(Database* a_dbb)
+ explicit Linger(Database* a_dbb)
: dbb(a_dbb), active(false)
{ }
Modified: firebird/trunk/src/jrd/EngineInterface.h
===================================================================
--- firebird/trunk/src/jrd/EngineInterface.h 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/EngineInterface.h 2013-12-29 00:35:50 UTC (rev 58985)
@@ -392,7 +392,7 @@
private:
Attachment* att;
- // This mutexes guarantee attachment existence. After releasing both of them with possibly
+ // These mutexes guarantee attachment existence. After releasing both of them with possibly
// zero att_use_count one should check does attachment still exists calling getHandle().
Firebird::Mutex mainMutex, asyncMutex;
Modified: firebird/trunk/src/jrd/ExtEngineManager.cpp
===================================================================
--- firebird/trunk/src/jrd/ExtEngineManager.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/ExtEngineManager.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -80,7 +80,7 @@
{
*desc = format->fmt_desc[index];
- if (index % 2 == 0 && index / 2 < parameters.getCount())
+ if (index % 2 == 0 && index / 2u < parameters.getCount())
{
const Parameter* param = parameters[index / 2];
@@ -234,7 +234,7 @@
: CompoundStmtNode(pool)
{
// Iterate over the format items, except the EOF item.
- for (USHORT i = 0; i < message->format->fmt_count / 2 * 2; i += 2)
+ for (USHORT i = 0; i < (message->format->fmt_count / 2) * 2; i += 2)
{
ExtInitParameterNode* init = FB_NEW(pool) ExtInitParameterNode(
tdbb, pool, csb, message, i);
@@ -251,7 +251,7 @@
: CompoundStmtNode(pool)
{
// Iterate over the format items, except the EOF item.
- for (USHORT i = 0; i < message->format->fmt_count / 2 * 2; i += 2)
+ for (USHORT i = 0; i < (message->format->fmt_count / 2) * 2; i += 2)
{
if (!message->isSpecial[i / 2])
continue;
@@ -908,7 +908,7 @@
Record* record = newRpb->rpb_record;
UCHAR* p = newMsg.begin();
- for (unsigned i = 0; i < format->fmt_count / 2; ++i)
+ for (unsigned i = 0; i < format->fmt_count / 2u; ++i)
{
USHORT fieldPos = fieldsPos[i];
@@ -944,7 +944,7 @@
UCHAR* p = msgBuffer.getBuffer(format->fmt_length);
memset(p, 0, format->fmt_length);
- for (unsigned i = 0; i < format->fmt_count / 2; ++i)
+ for (unsigned i = 0; i < format->fmt_count / 2u; ++i)
{
USHORT fieldPos = fieldsPos[i];
Modified: firebird/trunk/src/jrd/RecordSourceNodes.cpp
===================================================================
--- firebird/trunk/src/jrd/RecordSourceNodes.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/RecordSourceNodes.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -1668,7 +1668,8 @@
DsqlMapNode* mapNode = mapItem->as<DsqlMapNode>();
fb_assert(mapNode);
- if (!mapNode) {
+ if (!mapNode)
+ {
ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-901) <<
Arg::Gds(isc_dsql_internal_err) <<
Arg::Gds(isc_random) << Arg::Str("UnionSourceNode::genBlr: expected DsqlMapNode") );
Modified: firebird/trunk/src/jrd/Routine.cpp
===================================================================
--- firebird/trunk/src/jrd/Routine.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/Routine.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -264,7 +264,7 @@
// Routine that is being altered may have references
// to it by other routines via pointer to current meta
- // data structure, so don't loose the structure or the pointer.
+ // data structure, so don't lose the structure or the pointer.
if (checkCache(tdbb) && !(flags & Routine::FLAG_BEING_ALTERED))
clearCache(tdbb);
Modified: firebird/trunk/src/jrd/cch.cpp
===================================================================
--- firebird/trunk/src/jrd/cch.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/cch.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -2416,7 +2416,7 @@
if (window->win_flags & WIN_large_scan)
{
- if (mustRead || bdb->bdb_flags & BDB_prefetch || bdb->bdb_scan_count < 0)
+ if (mustRead || (bdb->bdb_flags & BDB_prefetch) || bdb->bdb_scan_count < 0)
bdb->bdb_scan_count = window->win_scans;
}
else if (window->win_flags & WIN_garbage_collector)
@@ -2758,7 +2758,7 @@
}
}
- // release lock before loosing control over bdb, it prevents
+ // release lock before losing control over bdb, it prevents
// concurrent operations on released lock
if (release_flag)
{
Modified: firebird/trunk/src/jrd/jrd.cpp
===================================================================
--- firebird/trunk/src/jrd/jrd.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/jrd.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -494,7 +494,7 @@
class OverwriteHolder : public MutexLockGuard
{
public:
- OverwriteHolder(Database* to_remove)
+ explicit OverwriteHolder(Database* to_remove)
: MutexLockGuard(databases_mutex, FB_FUNCTION), dbb(to_remove)
{
for (Database** d_ptr = &databases; *d_ptr; d_ptr = &(*d_ptr)->dbb_next)
Modified: firebird/trunk/src/jrd/met.epp
===================================================================
--- firebird/trunk/src/jrd/met.epp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/met.epp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -2633,7 +2633,7 @@
jrd_prc* procedure;
- if (id < (SSHORT) attachment->att_procedures.getCount() && (procedure = attachment->att_procedures[id]) &&
+ if (id < (USHORT) attachment->att_procedures.getCount() && (procedure = attachment->att_procedures[id]) &&
procedure->getId() == id &&
!(procedure->flags & Routine::FLAG_BEING_SCANNED) &&
((procedure->flags & Routine::FLAG_SCANNED) || noscan) &&
Modified: firebird/trunk/src/jrd/trace/TraceConfigStorage.h
===================================================================
--- firebird/trunk/src/jrd/trace/TraceConfigStorage.h 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/jrd/trace/TraceConfigStorage.h 2013-12-29 00:35:50 UTC (rev 58985)
@@ -132,7 +132,7 @@
ConfigStorage* storage;
public:
- StorageInstance(Firebird::MemoryPool&) :
+ explicit StorageInstance(Firebird::MemoryPool&) :
storage(NULL)
{}
Modified: firebird/trunk/src/utilities/gsec/gsec.cpp
===================================================================
--- firebird/trunk/src/utilities/gsec/gsec.cpp 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/utilities/gsec/gsec.cpp 2013-12-29 00:35:50 UTC (rev 58985)
@@ -392,7 +392,7 @@
class Attributes : public ConfigFile
{
public:
- Attributes(IUser* data)
+ explicit Attributes(IUser* data)
: ConfigFile(USE_TEXT, data->attributes()->entered() ? data->attributes()->get() : "")
{ }
Modified: firebird/trunk/src/yvalve/YObjects.h
===================================================================
--- firebird/trunk/src/yvalve/YObjects.h 2013-12-28 06:55:05 UTC (rev 58984)
+++ firebird/trunk/src/yvalve/YObjects.h 2013-12-29 00:35:50 UTC (rev 58985)
@@ -308,7 +308,7 @@
class YMetadata
{
public:
- YMetadata(bool in)
+ explicit YMetadata(bool in)
: flag(false), input(in)
{ }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|