mcv compiler warning

Started by Jeff Janesover 7 years ago2 messageshackers
Jump to latest
#1Jeff Janes
jeff.janes@gmail.com

One of the recent mcv commits introduced an unused variable warning.

mcv.c: In function 'statext_mcv_serialize':
mcv.c:914:7: warning: unused variable 'itemlen' [-Wunused-variable]
int itemlen = ITEM_SIZE(dim);

The attached fixes it.

Cheers,

Jeff

Attachments:

mcv_assert_warning.patchapplication/octet-stream; name=mcv_assert_warning.patchDownload+1-1
#2Tomas Vondra
tomas.vondra@2ndquadrant.com
In reply to: Jeff Janes (#1)
Re: mcv compiler warning

On Fri, Jul 05, 2019 at 10:13:25AM -0400, Jeff Janes wrote:

One of the recent mcv commits introduced an unused variable warning.

mcv.c: In function 'statext_mcv_serialize':
mcv.c:914:7: warning: unused variable 'itemlen' [-Wunused-variable]
int itemlen = ITEM_SIZE(dim);

The attached fixes it.

Thanks.

I think I'll just get rid of the variable entirely, and will just call
the macro from the assert directly. The variable used to be referenced
on multiple places, but that changed during the serialization code
reworks.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services