This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/main by this push:
     new 52f051dbe AVRO-3957: [C] Fix typos in docs and examples (#2795)
52f051dbe is described below

commit 52f051dbeefad0b7e73187becad6c33747b047d3
Author: Sahil Kang <[email protected]>
AuthorDate: Mon Mar 11 03:01:21 2024 -0700

    AVRO-3957: [C] Fix typos in docs and examples (#2795)
    
    * AVRO-3957: [C] Fix misformatted type in docs
    
    Signed-off-by: Sahil Kang <[email protected]>
    Signed-off-by: Sahil Kang <[email protected]>
    
    * AVRO-3957: [C] Fix type in quickstop example
    
    This removes the following warning:
    
      avro/lang/c/examples/quickstop.c:123:40: warning: incompatible pointer 
types passing 'int32_t **' (aka 'int **') to parameter of type
            'const char **' [-Wincompatible-pointer-types]
                              avro_value_get_string(&first_value, &p, &size);
    
    Signed-off-by: Sahil Kang <[email protected]>
    Signed-off-by: Sahil Kang <[email protected]>
    
    ---------
    
    Signed-off-by: Sahil Kang <[email protected]>
    Signed-off-by: Sahil Kang <[email protected]>
---
 lang/c/docs/index.txt       | 2 +-
 lang/c/examples/quickstop.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lang/c/docs/index.txt b/lang/c/docs/index.txt
index a439a0526..df16f9d96 100644
--- a/lang/c/docs/index.txt
+++ b/lang/c/docs/index.txt
@@ -178,7 +178,7 @@ different versions of the Avro library.  That means that 
it's really
 only safe to use these hash values internally within the context of a
 single execution of a single application.
 
-The +reset+ method “clears out” an +avro_value_t instance, making sure
+The +reset+ method “clears out” an +avro_value_t+ instance, making sure
 that it's ready to accept the contents of a new value.  For scalars,
 this is usually a no-op, since the new value will just overwrite the old
 one.  For arrays and maps, this removes any existing elements from the
diff --git a/lang/c/examples/quickstop.c b/lang/c/examples/quickstop.c
index ff9e97005..b26dad10c 100644
--- a/lang/c/examples/quickstop.c
+++ b/lang/c/examples/quickstop.c
@@ -107,7 +107,7 @@ int print_person(avro_file_reader_t db, avro_schema_t 
reader_schema)
        if (rval == 0) {
                int64_t id;
                int32_t age;
-               int32_t *p;
+               const char *p;
                size_t size;
                avro_value_t id_value;
                avro_value_t first_value;

Reply via email to