Skip to content

Commit b5dedba

Browse files
committed
Initialize fields
1 parent 0fc9916 commit b5dedba

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

examples/dbcrypt/CryptApplication.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,14 @@ class CryptKey : public ICryptKeyCallbackImpl<CryptKey, CheckStatusWrapper>
5656
static const char k;
5757
};
5858

59-
const char CryptKey::k = 0x5a;
59+
constexpr char CryptKey::k = 0x5a;
6060

6161
class App
6262
{
6363
public:
6464
App() :
6565
master(fb_get_master_interface()),
66-
statusWrapper(master->getStatus()), status(&statusWrapper),
67-
p(NULL), att(NULL), tra(NULL)
66+
statusWrapper(master->getStatus()), status(&statusWrapper)
6867
{ }
6968

7069
~App()
@@ -188,7 +187,7 @@ class App
188187
}
189188

190189
printf("\nProviding key for crypt plugin - press enter to continue ...");
191-
getchar();
190+
(void) getchar();
192191

193192
att->detach(status);
194193
if (status->getState() & IStatus::STATE_ERRORS)
@@ -209,10 +208,10 @@ class App
209208
IMaster* master;
210209
CheckStatusWrapper statusWrapper;
211210
CheckStatusWrapper* status;
212-
IProvider* p;
213-
IAttachment* att;
214-
ITransaction* tra;
215-
IResultSet* curs;
211+
IProvider* p = nullptr;
212+
IAttachment* att = nullptr;
213+
ITransaction* tra = nullptr;
214+
IResultSet* curs = nullptr;
216215

217216
CryptKey key;
218217
};

src/include/firebird/Message.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
return getData(); \
103103
} \
104104
\
105-
Type data; \
105+
Type data{}; \
106106
::Firebird::MessageDesc desc; \
107107
}
108108

0 commit comments

Comments
 (0)