IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39416


Ignore:
Timestamp:
Mar 1, 2016, 11:30:25 AM (10 years ago)
Author:
eugene
Message:

list unused parameters; fix %u vs %d for unsigned chars; use start,end not START,END

Location:
branches/eam_branches/ohana.20160226/src
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20160226/src/addstar/src/ConfigInit.c

    r39041 r39416  
    224224
    225225  /* get detection filtering mask */
    226   if (!ScanConfig (config, "DETECTIONFILTER", "%d", 0, &options.detectionFilter)) {
     226  if (!ScanConfig (config, "DETECTIONFILTER", "%u", 0, &options.detectionFilter)) {
    227227      options.detectionFilter = 0;
    228228  }
  • branches/eam_branches/ohana.20160226/src/addstar/src/LoadDataSDSS.c

    r38553 r39416  
    55// each SDSS data set corresponds to 5 images (ugriz)
    66Catalog *LoadDataSDSS (FILE *f, char *imagename, Image **images, off_t *nvalid, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t Nimages) {
     7  OHANA_UNUSED_PARAM(Nimages);
    78
    89  off_t Nskip, Nvalid, NVALID;
  • branches/eam_branches/ohana.20160226/src/addstar/src/ReadImageHeader.c

    r39041 r39416  
    209209  }
    210210
    211   if (!gfits_scan (header, ImageIDKeyword, "%d", 1, &image[0].externID)) {
     211  if (!gfits_scan (header, ImageIDKeyword, "%u", 1, &image[0].externID)) {
    212212    image[0].externID = 0;
    213213  }
     
    272272
    273273  /* find expected number of stars */
    274   if (!gfits_scan (header, "NSTARS", "%d", 1, &image[0].nstar) && !NO_STARS) {
     274  if (!gfits_scan (header, "NSTARS", "%u", 1, &image[0].nstar) && !NO_STARS) {
    275275    fprintf (stderr, "WARNING: can't get NSTARS from header (TEXT mode will be invalid)\n");
    276276  }
  • branches/eam_branches/ohana.20160226/src/addstar/src/ReadStarsFITS.c

    r38553 r39416  
    4343// corresponding image header, load the stars from the table
    4444Catalog *ReadStarsFITS (FILE *f, Header *header, Header *in_theader) {
     45  OHANA_UNUSED_PARAM(header);
    4546
    4647  off_t Nskip;
  • branches/eam_branches/ohana.20160226/src/addstar/src/SkyRegionUtils.c

    r24977 r39416  
    22
    33SkyList *SkyListExistingSubset (SkyList *input, char *path) {
     4  OHANA_UNUSED_PARAM(path);
    45 
    56  int i, status, Nsubset, NSUBSET;
  • branches/eam_branches/ohana.20160226/src/addstar/src/build_links.c

    r39346 r39416  
    2727   not partial, and has a correct set of average[].measureOffset,Nmeasure values */
    2828off_t *init_measure_links (Average *average, off_t Naverage, Measure *measure, off_t Nmeasure) {
     29  OHANA_UNUSED_PARAM(measure);
    2930
    3031  off_t i, j, N;
     
    161162/* build the initial links assuming the table is sorted */
    162163off_t *init_missing_links (Average *average, off_t Naverage, Missing *missing, off_t Nmissing) {
     164  OHANA_UNUSED_PARAM(missing);
    163165
    164166  off_t i, j, N;
     
    229231   not partial, and has a correct set of average[].lensingOffset,Nlensing values */
    230232off_t *init_lensing_links (Average *average, off_t Naverage, Lensing *lensing, off_t Nlensing) {
     233  OHANA_UNUSED_PARAM(lensing);
    231234
    232235  off_t i, j, N;
  • branches/eam_branches/ohana.20160226/src/addstar/src/calibrate.c

    r30613 r39416  
    157157  /* create a hash array from Nstar[] entries */
    158158  ALLOCATE (Nlist, int, MaxN + 1);
    159   memset (Nlist, 0, MAX (0, MaxN*sizeof(int)));
     159  if (MaxN >= 0) {
     160    memset (Nlist, 0, sizeof(int));
     161  }
    160162  for (i = 0; i < Ncal; i++) {
    161163    Nlist[Nstar[i]] ++;
  • branches/eam_branches/ohana.20160226/src/addstar/src/greference.c

    r38986 r39416  
    44
    55Catalog *greference (char *Refcat, SkyRegion *region, int photcode) {
     6  OHANA_UNUSED_PARAM(photcode);
    67
    78  Catalog *catalog = NULL;
  • branches/eam_branches/ohana.20160226/src/addstar/src/loadgalphot_table.c

    r39282 r39416  
    33
    44int loadgalphot_table (SkyList *skylistInput, HostTable *hosts, char *filename, AddstarClientOptions *options) {
     5  OHANA_UNUSED_PARAM(hosts);
    56 
    67  int i, Nstars;
  • branches/eam_branches/ohana.20160226/src/addstar/src/loadsupercos_rawdata.c

    r38986 r39416  
    77
    88int loadsupercos_rawdata (Image *image, int *imlist, int Nimage, SkyTable *skytable, char *filename, AddstarClientOptions options) {
     9  OHANA_UNUSED_PARAM(Nimage);
    910 
    1011  int i;
  • branches/eam_branches/ohana.20160226/src/addstar/src/mkcmf.c

    r39248 r39416  
    13681368
    13691369int WriteXSRCtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars, float zeroPt, float exptime) {
     1370  OHANA_UNUSED_PARAM(Flag);
    13701371
    13711372  int i, j;
     
    15271528
    15281529int WriteXFITtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars) {
     1530  OHANA_UNUSED_PARAM(Flag);
    15291531
    15301532  int i;
     
    16881690
    16891691int WriteXGALtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars) {
     1692  OHANA_UNUSED_PARAM(Flag);
    16901693
    16911694  int i;
     
    18041807
    18051808int WriteXRADtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars, int Nrad) {
     1809  OHANA_UNUSED_PARAM(Flag);
    18061810
    18071811  int i, j, k;
     
    18811885
    18821886int WriteDETFtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars) {
     1887  OHANA_UNUSED_PARAM(X);
     1888  OHANA_UNUSED_PARAM(Y);
     1889  OHANA_UNUSED_PARAM(M);
     1890  OHANA_UNUSED_PARAM(Flag);
     1891  OHANA_UNUSED_PARAM(Nstars);
    18831892
    18841893  int i;
  • branches/eam_branches/ohana.20160226/src/addstar/src/sky_tessalation.c

    r37807 r39416  
    202202// for local projects such as the PS1 Medium Deep fields
    203203int sky_tessellation_local (FITS_DB *db, int level, int Nmax) {
     204  OHANA_UNUSED_PARAM(level);
     205  OHANA_UNUSED_PARAM(Nmax);
    204206
    205207  int Nimage;
     
    239241// we generate projects on uniform rings of constant dec height
    240242int sky_tessellation_rings (FITS_DB *db, int level, int Nmax) {
     243  OHANA_UNUSED_PARAM(level);
     244  OHANA_UNUSED_PARAM(Nmax);
    241245
    242246  int j, nDEC, Nimage, Nring, Ntotal, Ndigit;
     
    294298// based on code supplied by Tamas 2012.07.23
    295299int sky_tessellation_tamas (FITS_DB *db, int level, int Nmax) {
     300  OHANA_UNUSED_PARAM(level);
     301  OHANA_UNUSED_PARAM(Nmax);
    296302
    297303  int j, nDEC, Nimage, Nring, Ntotal, Ndigit;
     
    740746// format : guide to generate the filenames (c-type string format)
    741747SkyRectangle *sky_rectangle_tamas (double *Dec, double dm, double halfa, double halftheta, int *nring, char *format) {
     748  OHANA_UNUSED_PARAM(halfa);
    742749
    743750  static int Nname = 0;
  • branches/eam_branches/ohana.20160226/src/delstar/src/delete_duplicate_images.c

    r39313 r39416  
    630630
    631631off_t find_obstime_range (Image *image, off_t Nimage, off_t firstEntry) {
     632  OHANA_UNUSED_PARAM(image);
    632633
    633634  Nsubset = 0;
  • branches/eam_branches/ohana.20160226/src/delstar/src/delete_fix_LAP.c

    r38986 r39416  
    465465
    466466int delete_fix_LAP_measures (off_t *measureDrop, Catalog *catalog, ImageSubset *image, off_t Nimage) {
     467  OHANA_UNUSED_PARAM(Nimage);
    467468
    468469  /* internal counters */
  • branches/eam_branches/ohana.20160226/src/delstar/src/find_image_db.c

    r38441 r39416  
    8383
    8484  for (i = 0; i < Nimage; i++) {
    85     if (image[i].tzero < START) continue;
    86     if (image[i].tzero > END) continue;
     85    if (image[i].tzero < start) continue;
     86    if (image[i].tzero > end) continue;
    8787    if (code != NULL) {
    8888      if (image[i].photcode != code[0].code) continue;
  • branches/eam_branches/ohana.20160226/src/delstar/src/gimages.c

    r27435 r39416  
    4646 
    4747  /* get other header info */
    48   haveNx = gfits_scan (&header, "NAXIS1",   "%hd", 1, &image[0].NX);
    49   haveNy = gfits_scan (&header, "NAXIS2",   "%hd", 1, &image[0].NY);
     48  haveNx = gfits_scan (&header, "NAXIS1",   "%hu", 1, &image[0].NX);
     49  haveNy = gfits_scan (&header, "NAXIS2",   "%hu", 1, &image[0].NY);
    5050  if (!haveNx && !haveNy) {
    51       haveNx = gfits_scan (&header, "IMNAXIS1",   "%hd", 1, &image[0].NX);
    52       haveNy = gfits_scan (&header, "IMNAXIS2",   "%hd", 1, &image[0].NY);
     51      haveNx = gfits_scan (&header, "IMNAXIS1",   "%hu", 1, &image[0].NX);
     52      haveNy = gfits_scan (&header, "IMNAXIS2",   "%hu", 1, &image[0].NY);
    5353  }     
    5454  if (!haveNx && !haveNy) {
    55       haveNx = gfits_scan (&header, "ZNAXIS1",   "%hd", 1, &image[0].NX);
    56       haveNy = gfits_scan (&header, "ZNAXIS2",   "%hd", 1, &image[0].NY);
     55      haveNx = gfits_scan (&header, "ZNAXIS1",   "%hu", 1, &image[0].NX);
     56      haveNy = gfits_scan (&header, "ZNAXIS2",   "%hu", 1, &image[0].NY);
    5757  }
    5858  if (!haveNx || !haveNy) {
Note: See TracChangeset for help on using the changeset viewer.