IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24002


Ignore:
Timestamp:
Apr 29, 2009, 5:13:43 PM (17 years ago)
Author:
Paul Price
Message:

Checking return value of fscanf to avoid fatal warning under gcc 4.3.3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/load_subpix.c

    r3376 r24002  
    2222
    2323  for (i = 0; i < Nsubpix; i++) {
    24     fscanf (f, "%*s %*s %lf %lf %lf %*s\n",
    25             &Subpix[i].Amp, &Subpix[i].Phase, &Subpix[i].dM);
     24      if (fscanf (f, "%*s %*s %lf %lf %lf %*s\n",
     25                  &Subpix[i].Amp, &Subpix[i].Phase, &Subpix[i].dM) != 3) {
     26          Shutdown("can't read subpix datafile %s", SubpixDatafile);
     27      }
    2628  }
    2729  fclose (f);
Note: See TracChangeset for help on using the changeset viewer.