projects/aports·blob master · refs

21 lines · 603 B

1This fixes mismatching function signatures when using function pointers to
2iJp2_file_read and iJp2_file_write in jas_stream_opts_t.
3
4--- a/src-IL/src/il_jp2.cpp
5+++ b/src-IL/src/il_jp2.cpp
6@@ -314,13 +314,13 @@
7
8
9
10-static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt)
11+static ssize_t iJp2_file_read(jas_stream_obj_t *obj, char *buf, size_t cnt)
12 {
13 obj;
14 return iread(buf, 1, cnt);
15 }
16
17-static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt)
18+static ssize_t iJp2_file_write(jas_stream_obj_t *obj, const char *buf, size_t cnt)
19 {
20 obj;
21 return iwrite(buf, 1, cnt);