Content-Length: 275270 | pFad | http://github.com/postgrespro/postgres/commit/af8a94d18d70ca226a12057ad4b3d17f27d8ff13

A9 Silence uninitialized variable compiler warning in sepgsql · postgrespro/postgres@af8a94d · GitHub
Skip to content

Commit af8a94d

Browse files
committed
Silence uninitialized variable compiler warning in sepgsql
At -Og optimization gcc warns that variable tclass may be used uninitialized when relkind == RELKIND_INDEX. Actually that can't happen due to an early return, but quiet the compiler by initializing tclass to 0. In passing, use uint16_t consistently for the declaration of tclass. Complaint and initial patch by Mike Palmiotto. Editorializing by me. Probably not worth backpatching given that it is cosmetic, so apply to development head only. Discussion: https://postgr.es/m/flat/623bcaae-112e-ced0-8c22-a84f75ae0c53%40joeconway.com
1 parent bd190ea commit af8a94d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/sepgsql/relation.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ sepgsql_relation_post_create(Oid relOid)
243243
HeapTuple tuple;
244244
Form_pg_class classForm;
245245
ObjectAddress object;
246-
uint16 tclass;
246+
uint16_t tclass;
247247
char *scontext; /* subject */
248248
char *tcontext; /* schema */
249249
char *rcontext; /* relation */
@@ -413,7 +413,7 @@ sepgsql_relation_drop(Oid relOid)
413413
{
414414
ObjectAddress object;
415415
char *audit_name;
416-
uint16_t tclass;
416+
uint16_t tclass = 0;
417417
char relkind;
418418

419419
relkind = get_rel_relkind(relOid);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/af8a94d18d70ca226a12057ad4b3d17f27d8ff13

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy