Skip to content

Commit

Permalink
Merge pull request #131 from vslavik/msvc-fixes
Browse files Browse the repository at this point in the history
Compilation and warnings fixes for modern MSVC
  • Loading branch information
brechtsanders authored Jul 24, 2024
2 parents de548bb + 45ff9b1 commit de9d53a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/xlsxio_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ DLL_EXPORT_XLSXIO int xlsxioread_sheet_next_cell_datetime (xlsxioreadersheet she
if (value != 0) {
value = (value - 25569) * 86400; //conversion from Excel to Unix timestamp
}
*pvalue = value;
*pvalue = (time_t)value;
}
free(result);
return 1;
Expand Down
4 changes: 3 additions & 1 deletion lib/xlsxio_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ typedef struct zip_source zip_source_t;
#if defined(_MSC_VER)
# undef DLL_EXPORT_XLSXIO
# define DLL_EXPORT_XLSXIO
# define va_copy(dst,src) ((dst) = (src))
# ifndef va_copy
# define va_copy(dst,src) ((dst) = (src))
# endif
#endif

#ifdef _WIN32
Expand Down
2 changes: 1 addition & 1 deletion src/xlsxio_write_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ int main (int argc, char* argv[])
if (argc <= 1)
return 0;
unlink(argv[1]);
if ((handle = xlsxiowrite_open(argv[1])) == NULL) {
if ((handle = xlsxiowrite_open(argv[1], NULL)) == NULL) {
fprintf(stderr, "Error creating zip file\n");
return 1;
}
Expand Down

0 comments on commit de9d53a

Please sign in to comment.