[
https://issues.apache.org/jira/browse/AVRO-1405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13851108#comment-13851108
]
Doug Cutting commented on AVRO-1405:
------------------------------------
I get a bunch of errors compiling the new test when I apply this.
{code}
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c: In function
‘write_data’:
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:89:5: error: ‘for’
loop initial declarations are only allowed in C99 mode
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:89:5: note: use
option -std=c99 or -std=gnu99 to compile your code
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c: At top level:
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:147:13: error:
redefinition of ‘PERSON_SCHEMA’
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:6:13: note: previous
definition of ‘PERSON_SCHEMA’ was here
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:157:13: error:
redefinition of ‘file’
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:16:13: note:
previous definition of ‘file’ was here
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:159:6: error:
redefinition of ‘print_avro_value’
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:18:6: note: previous
definition of ‘print_avro_value’ was here
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:167:5: error:
redefinition of ‘read_data’
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:26:5: note: previous
definition of ‘read_data’ was here
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:209:5: error:
redefinition of ‘write_data’
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:68:5: note: previous
definition of ‘write_data’ was here
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c: In function
‘write_data’:
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:230:5: error: ‘for’
loop initial declarations are only allowed in C99 mode
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c: At top level:
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:268:5: error:
redefinition of ‘main’
/home/cutting/src/avro/trunk/lang/c/tests/test_avro_1405.c:127:5: note:
previous definition of ‘main’ was here
make[2]: *** [tests/CMakeFiles/test_avro_1405.dir/test_avro_1405.o] Error 1
{code}
> Avro-c may not handle eof correctly if avro data file contains multiple sync
> markers
> ------------------------------------------------------------------------------------
>
> Key: AVRO-1405
> URL: https://issues.apache.org/jira/browse/AVRO-1405
> Project: Avro
> Issue Type: Bug
> Components: c
> Affects Versions: 1.7.5
> Reporter: Mika Ristimaki
> Assignee: Mika Ristimaki
> Priority: Minor
> Fix For: 1.7.6
>
> Attachments: AVRO-1405.patch
>
>
> I encountered a bug in the Avro C API. If the following is done, it seems
> that the Avro data file reader can not read the file correctly
> {code}
> while (has values to write) {
> Open file for writing
> Write a value to the file
> Close the writer
> }
> {code}
> Reading this file with Avro data file reader fails with EOF after only the
> first item has been read from the file.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)