Skip to content

Commit ceff9f9

Browse files
committed
use default initializer of C Client
1 parent f46870a commit ceff9f9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/RowSet.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ namespace griddb {
3434
*/
3535
bool RowSet::has_next() {
3636
GSRowSetType type;
37-
bool hasNextRow = false;
3837
type = this->type();
3938
switch(type) {
4039
case (GS_ROW_SET_CONTAINER_ROWS):
@@ -146,7 +145,7 @@ namespace griddb {
146145
* Get next query analysis
147146
*/
148147
QueryAnalysisEntry* RowSet::get_next_query_analysis(){
149-
GSQueryAnalysisEntry queryAnalysis;
148+
GSQueryAnalysisEntry queryAnalysis = GS_QUERY_ANALYSIS_ENTRY_INITIALIZER;
150149
GSResult ret;
151150
ret = gsGetNextQueryAnalysis(mRowSet, &queryAnalysis);
152151
if (ret != GS_RESULT_OK) {

src/Store.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace griddb {
4848
* Return information object of a specific container
4949
*/
5050
ContainerInfo* Store::get_container_info(const char* name) {
51-
GSContainerInfo containerInfo;
51+
GSContainerInfo containerInfo = GS_CONTAINER_INFO_INITIALIZER;
5252
GSChar bExists;
5353
GSResult ret = gsGetContainerInfo(mStore, name, &containerInfo, &bExists);
5454
if (ret != GS_RESULT_OK) {
@@ -90,7 +90,7 @@ namespace griddb {
9090
//If not found container, return NULL in target language
9191
return NULL;
9292
}
93-
GSContainerInfo containerInfo;
93+
GSContainerInfo containerInfo = GS_CONTAINER_INFO_INITIALIZER;
9494
GSChar bExists;
9595
ret = gsGetContainerInfo(mStore, name, &containerInfo, &bExists);
9696
if (ret != GS_RESULT_OK) {
@@ -138,7 +138,6 @@ namespace griddb {
138138
*/
139139
void Store::multi_put(GSRow*** listRow, const int *listRowContainerCount,
140140
const char ** listContainerName, size_t containerCount) {
141-
const GSChar *containerName;
142141
GSResult ret;
143142
GSContainerRowEntry * entryList = (GSContainerRowEntry*) malloc (containerCount * sizeof(GSContainerRowEntry));
144143
for (int i= 0; i < containerCount; i++) {

0 commit comments

Comments
 (0)