fgetc() returns int, not char.
authorTom Lane <[email protected]>
Mon, 11 Apr 2022 17:15:46 +0000 (13:15 -0400)
committerTom Lane <[email protected]>
Mon, 11 Apr 2022 17:15:46 +0000 (13:15 -0400)
This has no practical effect, since this code doesn't actually need to
distinguish EOF (-1) from \0377; but it silences a Coverity complaint.

src/backend/utils/activity/pgstat.c

index 7df3fda64849e1b00a0385806b7e72ee9dd41788..ea1cb8d1e3f3d7e4f53dfd61455e3b54c59ff46d 100644 (file)
@@ -1498,7 +1498,7 @@ pgstat_read_statsfile(void)
         */
        for (;;)
        {
-               char            t = fgetc(fpin);
+               int                     t = fgetc(fpin);
 
                switch (t)
                {