Small fixes (potential compilation problems)

This commit is contained in:
Celine Mercier
2020-10-30 10:41:58 +01:00
parent 422a6450fa
commit 199f3772e8
2 changed files with 4 additions and 6 deletions

View File

@ -63,8 +63,6 @@ cdef extern from "obidmscolumn.h" nogil:
char* obi_get_elements_names(OBIDMS_column_p column)
char* obi_column_formatted_infos(OBIDMS_column_p column)
index_t obi_column_get_element_index_from_name(OBIDMS_column_p column, const char* element_name)
int obi_column_write_comments(OBIDMS_column_p column, const char* comments)

View File

@ -2610,7 +2610,7 @@ char* obi_view_formatted_infos(Obiview_p view, bool detailed)
int i;
char* view_infos = NULL;
char* view_name = NULL;
time_t creation_date = NULL;
time_t creation_date;
char* creation_date_str = NULL;
index_t line_count;
char line_count_str[256];
@ -2637,7 +2637,7 @@ char* obi_view_formatted_infos(Obiview_p view, bool detailed)
// Line count
line_count = (view->infos)->line_count;
snprintf(line_count_str, sizeof line_count_str, "%zu", line_count);
snprintf(line_count_str, sizeof line_count_str, "%lld", line_count);
view_infos = realloc(view_infos, (strlen(view_infos)+strlen("\n# Line count:\n")+strlen(line_count_str)+1) * sizeof(char));
strcat(view_infos, "# Line count:\n");
strcat(view_infos, line_count_str);
@ -2705,7 +2705,7 @@ char* obi_view_formatted_infos_one_line(Obiview_p view)
int i;
char* view_infos = NULL;
char* view_name = NULL;
time_t creation_date = NULL;
time_t creation_date;
char* creation_date_str = NULL;
index_t line_count;
char line_count_str[256];
@ -2731,7 +2731,7 @@ char* obi_view_formatted_infos_one_line(Obiview_p view)
// Line count
line_count = (view->infos)->line_count;
snprintf(line_count_str, sizeof line_count_str, "%zu", line_count);
snprintf(line_count_str, sizeof line_count_str, "%lld", line_count);
view_infos = realloc(view_infos, (strlen(view_infos)+strlen(" ; Line count: ")+strlen(line_count_str)+1) * sizeof(char));
strcat(view_infos, " ; Line count: ");
strcat(view_infos, line_count_str);