On Tue, Jan 13, 2015 at 5:36 PM, Heikki Linnakangas
<hlinnakan...@vmware.com> wrote:
> You'll need to use "(void) pushJsonbValue(...)", otherwise you'll just get a
> different warning. See commit c8315930.
Oh, I see. So this portion in contrib/ has been visibly missing.
Attached is a new patch.
-- 
Michael
*** a/contrib/hstore/hstore_io.c
--- b/contrib/hstore/hstore_io.c
***************
*** 1338,1344 **** hstore_to_jsonb(PG_FUNCTION_ARGS)
  	JsonbParseState *state = NULL;
  	JsonbValue *res;
  
! 	res = pushJsonbValue(&state, WJB_BEGIN_OBJECT, NULL);
  
  	for (i = 0; i < count; i++)
  	{
--- 1338,1344 ----
  	JsonbParseState *state = NULL;
  	JsonbValue *res;
  
! 	(void) pushJsonbValue(&state, WJB_BEGIN_OBJECT, NULL);
  
  	for (i = 0; i < count; i++)
  	{
***************
*** 1349,1355 **** hstore_to_jsonb(PG_FUNCTION_ARGS)
  		key.val.string.len = HS_KEYLEN(entries, i);
  		key.val.string.val = HS_KEY(entries, base, i);
  
! 		res = pushJsonbValue(&state, WJB_KEY, &key);
  
  		if (HS_VALISNULL(entries, i))
  		{
--- 1349,1355 ----
  		key.val.string.len = HS_KEYLEN(entries, i);
  		key.val.string.val = HS_KEY(entries, base, i);
  
! 		(void) pushJsonbValue(&state, WJB_KEY, &key);
  
  		if (HS_VALISNULL(entries, i))
  		{
***************
*** 1361,1367 **** hstore_to_jsonb(PG_FUNCTION_ARGS)
  			val.val.string.len = HS_VALLEN(entries, i);
  			val.val.string.val = HS_VAL(entries, base, i);
  		}
! 		res = pushJsonbValue(&state, WJB_VALUE, &val);
  	}
  
  	res = pushJsonbValue(&state, WJB_END_OBJECT, NULL);
--- 1361,1367 ----
  			val.val.string.len = HS_VALLEN(entries, i);
  			val.val.string.val = HS_VAL(entries, base, i);
  		}
! 		(void) pushJsonbValue(&state, WJB_VALUE, &val);
  	}
  
  	res = pushJsonbValue(&state, WJB_END_OBJECT, NULL);
***************
*** 1385,1391 **** hstore_to_jsonb_loose(PG_FUNCTION_ARGS)
  
  	initStringInfo(&tmp);
  
! 	res = pushJsonbValue(&state, WJB_BEGIN_OBJECT, NULL);
  
  	for (i = 0; i < count; i++)
  	{
--- 1385,1391 ----
  
  	initStringInfo(&tmp);
  
! 	(void) pushJsonbValue(&state, WJB_BEGIN_OBJECT, NULL);
  
  	for (i = 0; i < count; i++)
  	{
***************
*** 1396,1402 **** hstore_to_jsonb_loose(PG_FUNCTION_ARGS)
  		key.val.string.len = HS_KEYLEN(entries, i);
  		key.val.string.val = HS_KEY(entries, base, i);
  
! 		res = pushJsonbValue(&state, WJB_KEY, &key);
  
  		if (HS_VALISNULL(entries, i))
  		{
--- 1396,1402 ----
  		key.val.string.len = HS_KEYLEN(entries, i);
  		key.val.string.val = HS_KEY(entries, base, i);
  
! 		(void) pushJsonbValue(&state, WJB_KEY, &key);
  
  		if (HS_VALISNULL(entries, i))
  		{
***************
*** 1471,1477 **** hstore_to_jsonb_loose(PG_FUNCTION_ARGS)
  				val.val.string.val = HS_VAL(entries, base, i);
  			}
  		}
! 		res = pushJsonbValue(&state, WJB_VALUE, &val);
  	}
  
  	res = pushJsonbValue(&state, WJB_END_OBJECT, NULL);
--- 1471,1477 ----
  				val.val.string.val = HS_VAL(entries, base, i);
  			}
  		}
! 		(void) pushJsonbValue(&state, WJB_VALUE, &val);
  	}
  
  	res = pushJsonbValue(&state, WJB_END_OBJECT, NULL);
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to