mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-28 11:00:34 +00:00
Silence overzealous -Wunused-result warnings on GCC
This commit is contained in:
parent
dd55129ed3
commit
3c3f2b2b21
@ -88,11 +88,11 @@ EX namespace sn {
|
||||
FILE *f = fopen(fname.c_str(), "rb");
|
||||
if(!f) f = fopen((rsrcdir + fname).c_str(), "rb");
|
||||
if(!f) { addMessage(XLAT("geodesic table missing")); pmodel = mdPerspective; return; }
|
||||
ignore(fread(&PRECX, 4, 1, f));
|
||||
ignore(fread(&PRECY, 4, 1, f));
|
||||
ignore(fread(&PRECZ, 4, 1, f));
|
||||
hr::ignore(fread(&PRECX, 4, 1, f));
|
||||
hr::ignore(fread(&PRECY, 4, 1, f));
|
||||
hr::ignore(fread(&PRECZ, 4, 1, f));
|
||||
tab.resize(PRECX * PRECY * PRECZ);
|
||||
ignore(fread(&tab[0], sizeof(compressed_point) * PRECX * PRECY * PRECZ, 1, f));
|
||||
hr::ignore(fread(&tab[0], sizeof(compressed_point) * PRECX * PRECY * PRECZ, 1, f));
|
||||
fclose(f);
|
||||
loaded = true;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ string gen_latex(presmode mode, string s, int res) {
|
||||
string filename = format("latex-cache/%08X.png", hash);
|
||||
if(mode == pmStartAll) {
|
||||
if(!file_exists(filename)) {
|
||||
system("mkdir latex-cache");
|
||||
hr::ignore(system("mkdir latex-cache"));
|
||||
FILE *f = fopen("latex-cache/rogueviz-latex.tex", "w");
|
||||
fprintf(f,
|
||||
"\\documentclass[border=2pt]{standalone}\n"
|
||||
@ -172,9 +172,9 @@ string gen_latex(presmode mode, string s, int res) {
|
||||
"\\end{varwidth}\n"
|
||||
"\\end{document}\n", s.c_str());
|
||||
fclose(f);
|
||||
system("cd latex-cache; pdflatex rogueviz-latex.tex");
|
||||
hr::ignore(system("cd latex-cache; pdflatex rogueviz-latex.tex"));
|
||||
string pngline = "cd latex-cache; pdftopng -r " + its(res) + " rogueviz-latex.pdf t";
|
||||
system(pngline.c_str());
|
||||
hr::ignore(system(pngline.c_str()));
|
||||
rename("latex-cache/t-000001.png", filename.c_str());
|
||||
}
|
||||
}
|
||||
|
@ -36,13 +36,13 @@ void load_maniset(maniset& m, int scale) {
|
||||
m.names.push_back(buf);
|
||||
auto& md = m.mdata[buf];
|
||||
int N, M;
|
||||
fscanf(f, "%d%d", &N, &M);
|
||||
hr::ignore(fscanf(f, "%d%d", &N, &M));
|
||||
println(hlog, "reading ", buf, " of size ", N, " and ", M, " edges");
|
||||
md.size = N;
|
||||
auto& ed = md.edges;
|
||||
for(int i=0; i<M; i++) {
|
||||
int a, b;
|
||||
fscanf(f, "%d%d", &a, &b);
|
||||
hr::ignore(fscanf(f, "%d%d", &a, &b));
|
||||
ed.emplace_back(a, b);
|
||||
}
|
||||
md.distances = measures::build_distance_matrix(N, md.edges);
|
||||
@ -125,10 +125,10 @@ void analyze_test() {
|
||||
|
||||
while(current_row < it) {
|
||||
current_row++;
|
||||
for(int i=0; i<No; i++) fscanf(f, "%d", &mapp[i]);
|
||||
int V = 0; fscanf(vor, "%d", &V);
|
||||
for(int i=0; i<No; i++) hr::ignore(fscanf(f, "%d", &mapp[i]));
|
||||
int V = 0; hr::ignore(fscanf(vor, "%d", &V));
|
||||
vor_edges.resize(V);
|
||||
for(int i=0; i<V; i++) fscanf(vor, "%d%d", &vor_edges[i].first, &vor_edges[i].second);
|
||||
for(int i=0; i<V; i++) hr::ignore(fscanf(vor, "%d%d", &vor_edges[i].first, &vor_edges[i].second));
|
||||
if(mapp.back() == -2) goto next_pair;
|
||||
if(current_row == it)
|
||||
edo_recreated = measures::recreate_topology(mapp, edo);
|
||||
@ -226,4 +226,4 @@ auto khook = arg::add3("-analyze-test", analyze_test);
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -800,7 +800,7 @@ bool more = true;
|
||||
|
||||
void create_index() {
|
||||
|
||||
system(("mkdir " + som_test_dir).c_str());
|
||||
hr::ignore(system(("mkdir " + som_test_dir).c_str()));
|
||||
|
||||
fhstream f(som_test_dir + "index-" + its(current_scale) + ".html", "wt");
|
||||
|
||||
@ -958,7 +958,7 @@ void all_pairs(bool one) {
|
||||
|
||||
string dir = som_test_dir + "pairs" + cg();
|
||||
|
||||
system(("mkdir -p " + dir + "/img").c_str());
|
||||
hr::ignore(system(("mkdir -p " + dir + "/img").c_str()));
|
||||
|
||||
int sid = 0;
|
||||
for(auto s1: shapelist) {
|
||||
@ -1093,7 +1093,7 @@ void all_pairs(bool one) {
|
||||
}
|
||||
}
|
||||
|
||||
system("touch done");
|
||||
hr::ignore(system("touch done"));
|
||||
}
|
||||
|
||||
bool verify_distlists = false;
|
||||
|
Loading…
Reference in New Issue
Block a user