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

jgemignani pushed a commit to branch PG11
in repository https://gitbox.apache.org/repos/asf/age.git


The following commit(s) were added to refs/heads/PG11 by this push:
     new ca9c57c8 refact toStringList function for int64 types (#1130)
ca9c57c8 is described below

commit ca9c57c82badb4e66ed200f62c774beafdc524de
Author: Marcos Silva <[email protected]>
AuthorDate: Mon Aug 14 15:24:14 2023 -0300

    refact toStringList function for int64 types (#1130)
    
    Fixed warning due to incorrect output type specifier and
    unused variable.
---
 src/backend/utils/adt/agtype.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/backend/utils/adt/agtype.c b/src/backend/utils/adt/agtype.c
index 7984a288..fbcd119c 100644
--- a/src/backend/utils/adt/agtype.c
+++ b/src/backend/utils/adt/agtype.c
@@ -6149,8 +6149,6 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)
     agtype_value string_elem;
     int count;
     int i;
-    float float_num;
-    int float_size;
     char buffer[64];
 
     /* check for null */
@@ -6204,7 +6202,6 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)
 
         case AGTV_FLOAT:
 
-            float_num = elem->val.float_value;
             sprintf(buffer, "%.*g", DBL_DIG, elem->val.float_value);
             string_elem.val.string.val = pstrdup(buffer);
             string_elem.val.string.len = strlen(buffer);
@@ -6215,7 +6212,7 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)
 
         case AGTV_INTEGER:
 
-            sprintf(buffer, "%d", elem->val.int_value);
+            sprintf(buffer, "%ld", elem->val.int_value);
             string_elem.val.string.val = pstrdup(buffer);
             string_elem.val.string.len = strlen(buffer);
 

Reply via email to