sraoss / pg_ivm

IVM (Incremental View Maintenance) implementation as a PostgreSQL extension
Other
862 stars 24 forks source link

Fix gcc warning in ExecRefreshImmv #19

Closed marcocitus closed 1 year ago

marcocitus commented 1 year ago

I got a compiler warning on gcc 9.4.0:

matview.c: In function ‘ExecRefreshImmv’:                                                
matview.c:449:3: warning: ‘dataQuery’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  449 |   CreateIvmTriggersOnBaseTables(dataQuery, matviewOid, false);                   
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  

Not a bug, just compiler not understanding that dataQuery is always initialized if !skipData.

thoshiai commented 1 year ago

Thank you for your patch! Looks goods, so I marge it