IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33982


Ignore:
Timestamp:
Jun 1, 2012, 5:41:44 PM (14 years ago)
Author:
eugene
Message:

various fixes to address somewhat more pedantic aspects of the new gcc (version 4.6.3)

Location:
branches/eam_branches/ipp-20120601/Ohana/src
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/GetFileMode.c

    r31627 r33982  
    77
    88  int Naxis;
    9   int simple, extend, haveNaxis, haveCTYPE;
     9  int simple, extend;
    1010  int havePHOT_VER, haveTARG_VER;
    1111
    1212  gfits_scan_alt (header, "SIMPLE", "%t", 1, &simple);
    13   haveNaxis = gfits_scan (header, "NAXIS",  "%d", 1, &Naxis);
    14   haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);
     13  int haveNaxis = gfits_scan (header, "NAXIS",  "%d", 1, &Naxis);
     14  int haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);
    1515
    1616  gfits_scan_alt (header, "EXTEND", "%t", 1, &extend);
     
    2222  if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ;
    2323
    24   if ((Naxis == 2) || TEXTMODE || !simple) {
    25     if (!strcmp (&ctype[4], "-WRP")) {
     24  if (haveNaxis && ((Naxis == 2) || TEXTMODE || !simple)) {
     25    if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) {
    2626      return MOSAIC_CMP;
    2727    }
  • branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/edge_check.c

    r3361 r33982  
    44
    55  double theta1, theta2;
    6   double Theta1, Theta2;
    76
    87  theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]);
     
    1716  }
    1817
    19   Theta1 = theta1;
    20   Theta2 = theta2;
    2118  theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]);
    2219  theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]);
  • branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/get2mass_full.c

    r30613 r33982  
    2323  star[0][0].measure.theta = ToShortPixels(strtod (ptr, NULL));
    2424
    25   star[2][0].measure.FWx   = star[2][0].measure.FWx   = star[0][0].measure.FWx;
    26   star[2][0].measure.FWy   = star[2][0].measure.FWy   = star[0][0].measure.FWy;
    27   star[2][0].measure.theta = star[2][0].measure.theta = star[0][0].measure.theta;
     25  star[2][0].measure.FWx   = star[1][0].measure.FWx   = star[0][0].measure.FWx;
     26  star[2][0].measure.FWy   = star[1][0].measure.FWy   = star[0][0].measure.FWy;
     27  star[2][0].measure.theta = star[1][0].measure.theta = star[0][0].measure.theta;
    2828
    2929  ptr = next2MASSfield (ptr); // designation (skip)
  • branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/get2mass_ops.c

    r21508 r33982  
    9595  dK = strtod (ptr, NULL);
    9696
    97   /* filter on the ph_qual flag for this filter (field 19) */
     97  // get the time
     98  time = get2mass_time (ptr, 20, Nmax - (ptr - line));
     99
     100# if (0)
     101  /* old code to filter on the ph_qual flag for this filter (field 19) */
    98102  if (SELECT_2MASS_QUALITY != NULL) {
    99103    ptr = skipNbounds (ptr, '|', 3, Nmax - (ptr - line));
     
    105109    time = get2mass_time (ptr, 20, Nmax - (ptr - line));
    106110  }
     111# endif
    107112
    108113  // how many bits are being used for the 2mass flags; can we just set photFlags based on them?
  • branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/load2mass_as_rawdata.c

    r24977 r33982  
    1414  int i, j, verbose;
    1515  int Nstars, NSTARS, Ntstars, NTSTARS;
    16   int Nbyte, Nextra, Ntotal, offset;
     16  int Nbyte, Nextra, offset;
    1717
    1818  double Rmin, Rmax, Dmin, Dmax;
     
    3737
    3838  Nextra = 0;  // number excess bytes from lsat partial row
    39   Ntotal = 0;  // track the total number of bytes read
    4039  while ((Nbyte = fread (&buffer[Nextra], 1, NBYTE-Nextra, f)) != 0) {
    4140    if (Nbyte == -1) Shutdown ("error reading from raw file %s", filename);
  • branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/load_subpix.c

    r24002 r33982  
    4545
    4646  int bin;
    47   double dy, dM;
     47  double dM;
    4848
    49   dy = y - (int)(y);
     49  // dy = y - (int)(y);
    5050  bin = 5 * (int)(x/100) + (int)(y/100);
    5151  dM = Subpix[bin].dM;
  • branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/resort_catalog.c

    r33653 r33982  
    146146  int NmeasureTotal = 0;
    147147  int measureOffsetOK = TRUE;
    148   for (i = 0; i < catalog[0].Naverage; i++) {
     148  for (i = 0; i < Naverage; i++) {
    149149    NmeasureTotal += catalog[0].average[i].Nmeasure;
    150150    if (VERBOSE && !(NmeasureTotal <= catalog[0].Nmeasure)) {
  • branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/ImageOps.c

    r31636 r33982  
    88{
    99
    10   int j, flipped, status, InPic;
     10  int j, flipped, status;
    1111  off_t i, n, *subset;
    1212  int npts;
     
    6565      x[2] = image[i].NX; y[2] = image[i].NY;
    6666      x[3] = 0;           y[3] = image[i].NY;
    67       InPic = flipped = FALSE;
     67      flipped = FALSE;
    6868      for (j = 0; j < 4; j++) {
    6969        XY_to_RD (&r, &d, x[j], y[j], &image[i].coords);
     
    9595      x[2] = image[i].NX; y[2] = image[i].NY;
    9696      x[3] = 0;           y[3] = image[i].NY;
    97       InPic = flipped = FALSE;
     97      flipped = FALSE;
    9898      for (j = 0; j < 4; j++) {
    9999        XY_to_RD (&r, &d, x[j], y[j], &image[i].coords);
  • branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/coordops.c

    r31663 r33982  
    6868  mode = GetProjectionMode (proj);
    6969  if (proj == PROJ_NONE) return (FALSE);
    70   if (proj == PROJ_MODE_NONE) return (FALSE);
     70  if (mode == PROJ_MODE_NONE) return (FALSE);
    7171
    7272  stht = ctht = 1;
     
    201201  mode = GetProjectionMode (proj);
    202202  if (proj == PROJ_NONE) return (FALSE);
    203   if (proj == PROJ_MODE_NONE) return (FALSE);
     203  if (mode == PROJ_MODE_NONE) return (FALSE);
    204204
    205205  /**** Locally Cartesian Projections ****/
  • branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/dbCmdlineFields.c

    r31636 r33982  
    136136    // XXX the ra and dec range depend on the projection.
    137137    // XXX this is wrong...
    138     int status;
    139     status = XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);
    140     status = XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);
     138    // int status;
     139    XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);
     140    XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);
    141141  }
    142142
  • branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/dbRPN.c

    r31635 r33982  
    44dbStack *dbRPN (int argc, char **argv, int *nstack) {
    55 
    6   int type, Nx, Ny;
     6  int type;
    77  int i, j, Nstack, Nop_stack, NSTACK;
    88  dbStack *stack, *op_stack;
     
    1717  }
    1818 
    19   Nx = Ny = Nstack = Nop_stack = 0;
     19  Nstack = Nop_stack = 0;
    2020  for (i = 0; i < argc; i++) {
    2121   
  • branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/dvo_image.c

    r33649 r33982  
    111111      exit (2);
    112112  }
    113   return (TRUE);
     113  return (status);
    114114}
    115115
  • branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/dvo_tiny_values.c

    r33649 r33982  
    5151
    5252    for (i = 0; i < catalog[0].Naverage; i++) {
    53       CopyAverageToTiny (&catalog[0].averageT[i], &catalog[0].average[i]);
     53      CopyAverageToTiny (&averageT[i], &average[i]);
    5454    }
    5555  }
     
    6161
    6262    for (i = 0; i < catalog[0].Nmeasure; i++) {
    63       CopyMeasureToTiny (&catalog[0].measureT[i], &catalog[0].measure[i]);
     63      CopyMeasureToTiny (&measureT[i], &measure[i]);
    6464    }
    6565  }
  • branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/skyregion_gsc.c

    r33649 r33982  
    271271  int i, j, Nz, NZ, Nregions, poleRegion;
    272272  SkyRegion *regions;
    273   SkyRegion tempregion;
    274273  SkyRegionZone *zones;
    275274  char basename[64];
     
    294293      poleRegion = SIGN(regions[i].Dmin);
    295294      Nregions --;
    296       tempregion = regions[i];
    297295      for (j = i; j < Nregions; j++) {
    298296        regions[j] = regions[j+1];
  • branches/eam_branches/ipp-20120601/Ohana/src/libfits/extern/fits_hdecompress.c

    r15487 r33982  
    10481048{
    10491049LONGLONG sumall;
    1050 int nel, stat;
     1050int stat;
    10511051unsigned char nbitplanes[3];
    10521052char tmagic[2];
     
    10711071        *scale=readint(infile);                         /* scale factor for digitization        */
    10721072       
    1073         nel = (*nx) * (*ny);
     1073        // nel = (*nx) * (*ny);
    10741074
    10751075        /* sum of all pixels    */
     
    10951095*/
    10961096{
    1097 int nel, stat;
     1097int stat;
    10981098LONGLONG sumall;
    10991099unsigned char nbitplanes[3];
     
    11191119        *scale=readint(infile);                         /* scale factor for digitization        */
    11201120       
    1121         nel = (*nx) * (*ny);
     1121        // nel = (*nx) * (*ny);
    11221122
    11231123        /* sum of all pixels    */
  • branches/eam_branches/ipp-20120601/Ohana/src/libfits/extern/ricecomp.c

    r18269 r33982  
    5959{
    6060Buffer bufmem, *buffer = &bufmem;
    61 int bsize, i, j, thisblock;
     61int i, j, thisblock;
    6262int lastpix, nextpix, pdiff;
    6363int v, fs, fsmask, top, fsmax, fsbits, bbits;
     
    7373     * compression of short & byte images.
    7474     */
    75     bsize = 4;
     75// int bsize = 4;
    7676
    7777/*    nblock = 32; now an input parameter*/
     
    277277{
    278278Buffer bufmem, *buffer = &bufmem;
    279 int bsize, i, j, thisblock;
     279int i, j, thisblock;
    280280
    281281/*
     
    299299     * compression of short & byte images.
    300300     */
    301     bsize = 2;
     301// bsize = 2;
    302302
    303303/*    nblock = 32; now an input parameter */
     
    501501{
    502502Buffer bufmem, *buffer = &bufmem;
    503 int bsize, i, j, thisblock;
     503int i, j, thisblock;
    504504
    505505/*
     
    523523     * compression of short & byte images.
    524524     */
    525     bsize = 1;
     525    // bsize = 1;
    526526
    527527/*    nblock = 32; now an input parameter */
     
    826826             int nblock)                /* coding block size            */
    827827{
    828 int bsize, i, k, imax;
     828int i, k, imax;
    829829int nbits, nzero, fs;
    830830unsigned char *cend, bytevalue;
     
    839839     * compression of short & byte images.
    840840     */
    841     bsize = 4;
     841// bsize = 4;
    842842
    843843/*    nblock = 32; now an input parameter */
     
    10141014{
    10151015int i, imax;
    1016 int bsize, k;
     1016int k;
    10171017int nbits, nzero, fs;
    10181018unsigned char *cend, bytevalue;
     
    10281028     */
    10291029
    1030     bsize = 2;
     1030// bsize = 2;
    10311031   
    10321032/*    nblock = 32; now an input parameter */
     
    12001200{
    12011201int i, imax;
    1202 int bsize, k;
     1202int k;
    12031203int nbits, nzero, fs;
    12041204unsigned char *cend;
     
    12141214     */
    12151215
    1216     bsize = 1;
     1216// bsize = 1;
    12171217   
    12181218/*    nblock = 32; now an input parameter */
  • branches/eam_branches/ipp-20120601/Ohana/src/libfits/matrix/F_compress_M.c

    r33648 r33982  
    4545  float zscale, zzero;
    4646
    47   int zdata_pixsize, odata_pixsize, idata_pixsize;
     47  int zdata_pixsize, odata_pixsize;
    4848
    4949  int *ztile = NULL;
     
    236236  zdata_pixsize = gfits_vartable_heap_pixsize (zdef.format);
    237237
    238   // size of a pixel in the final image
    239   idata_pixsize = abs(header[0].bitpix) / 8;
     238  // size of a pixel in the final image (not needed)
     239  // idata_pixsize = abs(header[0].bitpix) / 8;
    240240
    241241  // size of a pixel in the output from the decompression routine
     
    480480int gfits_compressed_is_primary (Header *header) {
    481481
    482     int has_ztension, has_zimage;
    483     int ztension, zimage;
    484 
    485     has_zimage   = gfits_scan_alt (header, "ZIMAGE",   "%t", 1, &zimage);
    486     has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension);
     482  int zimage = FALSE;
     483  // int ztension = FALSE;
     484
     485    int has_zimage   = gfits_scan_alt (header, "ZIMAGE",   "%t", 1, &zimage);
     486    // int has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension);
    487487
    488488    if (has_zimage && zimage) return (TRUE);
  • branches/eam_branches/ipp-20120601/Ohana/src/libfits/table/F_copy_T.c

    r31663 r33982  
    1717int gfits_copy_vtable (VTable *in, VTable *out) {
    1818
    19   off_t i, Nx, Ny, Nrows;
     19  off_t i;
    2020
    2121  /* find buffer size */
    22   Nx = in[0].header[0].Naxis[0];
    23   Ny = in[0].header[0].Naxis[1];
     22  off_t Nx = in[0].header[0].Naxis[0];
     23  // off_t Ny = in[0].header[0].Naxis[1];
    2424
    2525  // validate these two?
     
    3232  out[0].Nrow     = in[0].Nrow;
    3333
    34   Nrows = out[0].Nrow;
     34  off_t Nrows = out[0].Nrow;
    3535
    3636  ALLOCATE (out[0].row, off_t, MAX (Nrows, 1));
  • branches/eam_branches/ipp-20120601/Ohana/src/libkapa/src/DrawRotString.c

    r30603 r33982  
    137137
    138138  int ii, jj, byte_line, byte, bit, flag;
    139   unsigned long int fore, back;
     139  unsigned long int fore;
    140140  double i, j, cs, sn, rscale, tmp;
    141141  int X, Y, X0, X1, X2, Y0, Y1, Y2, x0, y0;
     
    143143  if (mode) {
    144144    fore = RotForeground;
    145     back = RotBackground;
     145    // back = RotBackground;
    146146  } else {
    147147    fore = RotBackground;
    148     back = RotForeground;
     148    // back = RotForeground;
    149149  }
    150150   
  • branches/eam_branches/ipp-20120601/Ohana/src/libkapa/src/KapaOpen.c

    r27988 r33982  
    252252int KapaOpenNamedSocket (char *kapa_exec, char *name) {
    253253
    254   int InitSocket, status;
     254  int InitSocket;
    255255  struct sockaddr_un Address;
    256256  socklen_t AddressLength;
     
    269269  Address.sun_family = AF_UNIX;
    270270  InitSocket = socket (AF_UNIX, SOCK_STREAM, 0);
    271   status = bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
    272   status = listen (InitSocket, 1);
     271  bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
     272  listen (InitSocket, 1);
    273273
    274274  if (name == NULL) {
  • branches/eam_branches/ipp-20120601/Ohana/src/libkapa/src/KiiOpen.c

    r27588 r33982  
    44int KiiOpen (char *kii_exec, char *name) {
    55
    6   int InitSocket, status;
     6  int InitSocket;
    77  struct sockaddr_un Address;
    88  socklen_t AddressLength;
     
    2121  Address.sun_family = AF_UNIX;
    2222  InitSocket = socket (AF_UNIX, SOCK_STREAM, 0);
    23   status = bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
    24   status = listen (InitSocket, 1);
     23  bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
     24  listen (InitSocket, 1);
    2525 
    2626  if (name == NULL) {
  • branches/eam_branches/ipp-20120601/Ohana/src/libkapa/src/KiiPicture.c

    r31160 r33982  
    2222
    2323  int Nwrite, Npix, Ncolors, size;
    24   float *in, min, max;
     24  float min, max;
    2525
    2626  Npix = image[0].Nx*image[0].Ny;
     
    2828  KiiSendCommand (fd, 4, "READ"); /* tell kapa to look for the incoming image */
    2929  KiiScanMessage (fd, "%d", &Ncolors);
    30 
    31   in = image[0].data1d;
    3230
    3331  /* these are for a future upgrade */
  • branches/eam_branches/ipp-20120601/Ohana/src/libohana/src/config.c

    r20358 r33982  
    131131 
    132132  FILE *f;
    133   int i, done, Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel;
     133  int i, Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel;
    134134  char *ibuffer, *obuffer, *tbuffer;
    135135  char *last, *next;
     
    149149  /* load data from file */
    150150  if (f) {
    151     done = FALSE;
    152151    while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) {
    153152      Nbytes += nbytes;
     
    382381 
    383382  FILE *f;
    384   int i, done, Nbytes, NBYTES, nbytes, Ncpy;
     383  int i, Nbytes, NBYTES, nbytes, Ncpy;
    385384  char *ibuffer;
    386385  char line[256];
     
    398397   
    399398  /* load data from file */
    400   done = FALSE;
    401399  while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) {
    402400    Nbytes += nbytes;
  • branches/eam_branches/ipp-20120601/Ohana/src/libohana/src/time.c

    r30602 r33982  
    9090
    9191  char *p1, *p2;
    92   double tmp;
     92  // double tmp;
    9393  int mode;
    9494
    9595  p1 = line;
    96   tmp = strtod (p1, &p2);
     96  strtod (p1, &p2);
    9797  mode = TIME_DATE;
    9898  if (p2 == p1 + strlen (p1) - 1) {
Note: See TracChangeset for help on using the changeset viewer.