This is an automated email from the ASF dual-hosted git repository.
jgemignani pushed a commit to branch PG12
in repository https://gitbox.apache.org/repos/asf/age.git
The following commit(s) were added to refs/heads/PG12 by this push:
new 2baf796b refact toStringList for int64 types (#1129)
2baf796b is described below
commit 2baf796b17cffda876efbc6181df62abb6173a26
Author: Marcos Silva <[email protected]>
AuthorDate: Mon Aug 14 15:24:45 2023 -0300
refact toStringList for int64 types (#1129)
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 540f2e6b..736f41d2 100644
--- a/src/backend/utils/adt/agtype.c
+++ b/src/backend/utils/adt/agtype.c
@@ -6159,8 +6159,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 */
@@ -6214,7 +6212,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);
@@ -6225,7 +6222,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);