Skip to content

Commit

Permalink
Fix some compiler warnings seen with the newer gcc version
Browse files Browse the repository at this point in the history
Reported on GitHub through issue #75 by Devrim Gündüz (devrimgunduz).

FDW-702, Sravan Velagandula.
  • Loading branch information
jeevanchalke committed Aug 22, 2024
1 parent 2ef3a51 commit a979856
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hdfs_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ hdfs_find_row_count(char *src)
strncpy(row_count, pos + strlen(statistics_str), 50);

/* Make sure that the string is null terminated */
row_count[51] = '\0';
row_count[50] = '\0';

return strtod(row_count, NULL);
}
Expand All @@ -88,7 +88,7 @@ hdfs_rowcount(int con_index, hdfs_opt *opt, PlannerInfo *root,
{
bool is_null;
StringInfoData sql;
double rc;
double rc = 0;

initStringInfo(&sql);
hdfs_deparse_explain(opt, &sql);
Expand Down
4 changes: 2 additions & 2 deletions libhive/jdbc/hiveclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int Initialize()
{
return -1;
}
delete libjvm;
delete[] libjvm;

_JNI_CreateJavaVM = (_JNI_CreateJavaVM_PTR)dlsym(hdfs_dll_handle, "JNI_CreateJavaVM");

Expand All @@ -118,7 +118,7 @@ int Initialize()
rc = _JNI_CreateJavaVM(&g_jvm, &g_jni, &vm_args);

delete[] options[0].optionString;
delete options;
delete[] options;
if (rc != JNI_OK)
{
return(-1);
Expand Down

0 comments on commit a979856

Please sign in to comment.