mirror of
https://github.com/jmcnamara/libxlsxwriter
synced 2025-03-28 21:13:14 +00:00
Fix OpenBSD warnings.
This commit is contained in:
parent
6777d3346e
commit
fce0f891d5
@ -143,6 +143,9 @@ enum lxw_custom_property_types {
|
||||
/* Max col string length. */
|
||||
#define LXW_MAX_COL_NAME_LENGTH sizeof("$XFD")
|
||||
|
||||
/* Max row string length. */
|
||||
#define LXW_MAX_ROW_NAME_LENGTH sizeof("$1048576")
|
||||
|
||||
/* Max cell string length. */
|
||||
#define LXW_MAX_CELL_NAME_LENGTH sizeof("$XFWD$1048576")
|
||||
|
||||
|
@ -103,7 +103,7 @@ lxw_rowcol_to_cell(char *cell_name, lxw_row_t row, lxw_col_t col)
|
||||
pos = strlen(cell_name);
|
||||
|
||||
/* Add the row to the cell. */
|
||||
sprintf(&cell_name[pos], "%d", ++row);
|
||||
snprintf(&cell_name[pos], LXW_MAX_ROW_NAME_LENGTH, "%d", ++row);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -126,7 +126,7 @@ lxw_rowcol_to_cell_abs(char *cell_name, lxw_row_t row, lxw_col_t col,
|
||||
cell_name[pos++] = '$';
|
||||
|
||||
/* Add the row to the cell. */
|
||||
sprintf(&cell_name[pos], "%d", ++row);
|
||||
snprintf(&cell_name[pos], LXW_MAX_ROW_NAME_LENGTH, "%d", ++row);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user