Skip to content

Commit 06c34a0

Browse files
[fileioc] add data corruption warning for ti_Resize
1 parent 02a3de2 commit 06c34a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/fileioc/fileioc.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,11 @@ uint16_t ti_GetSize(uint8_t handle);
331331
*
332332
* @param[in] handle AppVar/variable handle.
333333
* @param[in] size New AppVar/variable size.
334-
* @returns Resized size on success, `0` on failure, or `-1` if the AppVar/variable cannot be opened.
334+
* @returns Resized size on success, `0` on failure, or `-1` if the
335+
* AppVar/variable cannot be opened.
336+
* @warning This function does not maintain the data already stored in the
337+
* AppVar/variable when shrinking/expanding, and effectively
338+
* corrupts the contents.
335339
*/
336340
int ti_Resize(size_t size, uint8_t handle);
337341

0 commit comments

Comments
 (0)