diff --git a/hprint.cpp b/hprint.cpp index 87b143ca..083d1fbf 100644 --- a/hprint.cpp +++ b/hprint.cpp @@ -267,7 +267,7 @@ bool scan(fhstream& hs, int& i) { return fscanf(hs.f, "%d", &i) == 1; } bool scan(fhstream& hs, color_t& c) { return fscanf(hs.f, "%x", &c) == 1; } bool scan(fhstream& hs, ld& x) { return fscanf(hs.f, "%lf", &x) == 1; } bool scan(fhstream& hs, string& s) { char t[10000]; t[0] = 0; int err = fscanf(hs.f, "%9500s", t); s = t; return err == 1 && t[0]; } -string scanline(fhstream& hs) { char buf[10000]; buf[0] = 0; fgets(buf, 10000, hs.f); return buf; } +string scanline(fhstream& hs) { char buf[10000]; buf[0] = 0; ignore(fgets(buf, 10000, hs.f)); return buf; } /* string fts_smartdisplay(ld x, int maxdisplay) { diff --git a/nonisotropic.cpp b/nonisotropic.cpp index 0f0c061c..adb1e1f1 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -51,11 +51,11 @@ EX namespace solv { FILE *f = fopen(solfname.c_str(), "rb"); // if(!f) f = fopen("/usr/lib/soltable.dat", "rb"); if(!f) { addMessage(XLAT("geodesic table missing")); pmodel = mdPerspective; return; } - fread(&PRECX, 4, 1, f); - fread(&PRECY, 4, 1, f); - fread(&PRECZ, 4, 1, f); + ignore(fread(&PRECX, 4, 1, f)); + ignore(fread(&PRECY, 4, 1, f)); + ignore(fread(&PRECZ, 4, 1, f)); inverse_exp_table.resize(PRECX * PRECY * PRECZ); - fread(&inverse_exp_table[0], sizeof(nisot::ptlow) * PRECX * PRECY * PRECZ, 1, f); + ignore(fread(&inverse_exp_table[0], sizeof(nisot::ptlow) * PRECX * PRECY * PRECZ, 1, f)); fclose(f); table_loaded = true; }