Skip to content

Commit a97f55f

Browse files
authored
Merge pull request #293 from Libvisual/fix-lcdcontrol-gcc-warnings
Plugins (lcdcontrol): Fix GCC warnings on unused results.
2 parents c0cc4f9 + 7561ca3 commit a97f55f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libvisual-plugins/plugins/actor/lcdcontrol/PluginCpuinfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ static int ParseCpuinfo(void)
5555
return -1;
5656
}
5757
rewind(stream);
58-
while (!feof(stream)) {
59-
char buffer[256];
58+
59+
char buffer[256];
60+
while (fgets(buffer, sizeof(buffer), stream)) {
6061
char *c, *key, *val;
61-
fgets(buffer, sizeof(buffer), stream);
6262
c = strchr(buffer, ':');
6363
if (c == NULL)
6464
continue;

libvisual-plugins/plugins/actor/lcdcontrol/PluginMeminfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ int PluginMeminfo::ParseMeminfo()
5353
}
5454

5555
rewind(stream);
56-
while (!feof(stream)) {
57-
char buffer[256];
56+
57+
char buffer[256];
58+
while (fgets(buffer, sizeof(buffer), stream)) {
5859
char *c, *key, *val;
59-
fgets(buffer, sizeof(buffer), stream);
6060
c = strchr(buffer, ':');
6161
if (c == NULL)
6262
continue;

0 commit comments

Comments
 (0)