From: Vinson Lee Date: Wed, 30 Dec 2009 05:03:23 +0000 (-0800) Subject: glu/sgi: Silence warn_unused_result warnings. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70bbe2236668bdee9131dc2e6f71e53f9bc78863;p=mesa.git glu/sgi: Silence warn_unused_result warnings. --- diff --git a/src/glu/sgi/libnurbs/nurbtess/directedLine.cc b/src/glu/sgi/libnurbs/nurbtess/directedLine.cc index 1ceda025d9f..d942db7287e 100644 --- a/src/glu/sgi/libnurbs/nurbtess/directedLine.cc +++ b/src/glu/sgi/libnurbs/nurbtess/directedLine.cc @@ -793,22 +793,30 @@ directedLine* readAllPolygons(char* filename) { Int i,j; FILE* fp = fopen(filename, "r"); - assert(fp); Int nPolygons; - fscanf(fp, "%i", &nPolygons); + int result; + + assert(fp); + result = fscanf(fp, "%i", &nPolygons); + assert(result != EOF); directedLine *ret = NULL; for(i=0; irootLinkSet(NULL); { vert[0][0]=vert[1][0]; vert[0][1]=vert[1][1]; - fscanf(fp, "%f", &(vert[1][0])); - fscanf(fp, "%f", &(vert[1][1])); + result = fscanf(fp, "%f", &(vert[1][0])); + assert(result != EOF); + result = fscanf(fp, "%f", &(vert[1][1])); + assert(result != EOF); sLine = new sampledLine(2,vert); dLine = new directedLine(INCREASING, sLine); dLine->rootLinkSet(thisPoly);