IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4772


Ignore:
Timestamp:
Aug 15, 2005, 3:32:18 PM (21 years ago)
Author:
eugene
Message:

cleanup of Wall,Werror messages

Location:
trunk/Ohana/src
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/doc/Changes.txt

    r4468 r4772  
     1
     22005.08.15:
     3        cleanup of the minor Wall,Werror messages
    14
    252005.02.24 : I am adding the mosaic two-level astrometry information to the Image table.
  • trunk/Ohana/src/addstar/src/get2mass.c

    r4299 r4772  
    44Stars *get2mass (GSCRegion *patch, int *NSTARS, int mode) {
    55 
    6   char accel[64], *path;
     6  char *path;
    77  int i, Nstars, Nrefcat, Nregions;
    88  Stars     *stars;
     
    5555GSCRegion *get2mass_acc (GSCRegion *patch, int *nregions, char *path, char *accel) {
    5656
    57   int Nregions, NREGIONS, Nrec;
     57  int Nregions, NREGIONS;
    5858  GSCRegion *regions;
    5959  char accelfile[1024], line[256], filename[128];
  • trunk/Ohana/src/addstar/src/get2mass_as.c

    r4538 r4772  
    1515Stars *get2mass_AS_data (GSCRegion *region, GSCRegion *patch, int *nstars) {
    1616 
    17   int FilterSkip, TimeSkip, Np;
    18   int i, Nstars, NSTARS, Nbyte, Nline, Nextra, code, Qentry;
     17  int FilterSkip, TimeSkip;
     18  int Nstars, NSTARS, Nbyte, Nextra, code, Qentry;
    1919  Stars *stars;
    2020  gzFile gf;
    2121  char qc;
    2222  char *buffer, *filename;
    23   char *p, *q, *ptr, *end, *tmp;
    24   char line[1000];
    25   double RA, DEC, J, H, K, dJ, dH, dK, M, dM;
     23  char *p, *q, *ptr, *tmp;
     24  double RA, DEC, M, dM;
    2625  double RA0, RA1, DEC0, DEC1;
    2726  e_time time;
     
    130129  if (VERBOSE) fprintf (stderr, "\n");
    131130 
    132 finished:
    133131  gzclose (gf);
    134132  free (buffer);
  • trunk/Ohana/src/elixir/include/controller.h

    r2428 r4772  
    170170int       memstr (char *m1, char *m2, int n);
    171171int       rconnect (char *hostname, char *command, int *rsock, int *wsock);
     172void GetConfig (char *config, char *field, char *format, int N, void *ptr);
  • trunk/Ohana/src/elixir/src/DefineProcesses.c

    r2428 r4772  
    33Process **DefineProcesses (Process *global, int *nprocess, char *config) {
    44
    5   int i, j, status;
     5  int i, j;
    66  char procname[256], entry[256], field[256];
    77  Process **process;
     
    2222  ALLOCATE (global[0].argv[7], char, 256);
    2323 
    24   status =  (int) ScanConfig (config, "global.Nargs",   "%d",  0, &global[0].argc);
    25   status &= (int) ScanConfig (config, "global.success", "%s",  0, global[0].argv[0]);
    26   status &= (int) ScanConfig (config, "global.failure", "%s",  0, global[0].argv[1]);
    27   status &= (int) ScanConfig (config, "global.pending", "%s",  0, global[0].argv[2]);
    28   status &= (int) ScanConfig (config, "global.logfile", "%s",  0, global[0].argv[3]);
    29   status &= (int) ScanConfig (config, "global.source",  "%s",  0, global[0].argv[4]);
    30   status &= (int) ScanConfig (config, "global.msg",     "%s",  0, global[0].argv[5]);
    31   status &= (int) ScanConfig (config, "global.end",     "%s",  0, global[0].argv[6]);
    32   status &= (int) ScanConfig (config, "global.pid",     "%s",  0, global[0].argv[7]);
    33   if (!status) {
    34     fprintf (stderr, "missing global entry from config\n");
    35     fprintf (stderr, "global.Nargs: %d\n", global[0].argc);
    36     fprintf (stderr, "global.argv[0]: %s\n", global[0].argv[0]);
    37     fprintf (stderr, "global.argv[1]: %s\n", global[0].argv[1]);
    38     fprintf (stderr, "global.argv[2]: %s\n", global[0].argv[2]);
    39     fprintf (stderr, "global.argv[3]: %s\n", global[0].argv[3]);
    40     fprintf (stderr, "global.argv[4]: %s\n", global[0].argv[4]);
    41     fprintf (stderr, "global.argv[5]: %s\n", global[0].argv[5]);
    42     fprintf (stderr, "global.argv[6]: %s\n", global[0].argv[6]);
    43     fprintf (stderr, "global.argv[7]: %s\n", global[0].argv[7]);
    44     Shutdown (1);
    45   }
     24  GetConfig (config, "global.Nargs",   "%d",  0, &global[0].argc);
     25  GetConfig (config, "global.success", "%s",  0, global[0].argv[0]);
     26  GetConfig (config, "global.failure", "%s",  0, global[0].argv[1]);
     27  GetConfig (config, "global.pending", "%s",  0, global[0].argv[2]);
     28  GetConfig (config, "global.logfile", "%s",  0, global[0].argv[3]);
     29  GetConfig (config, "global.source",  "%s",  0, global[0].argv[4]);
     30  GetConfig (config, "global.msg",     "%s",  0, global[0].argv[5]);
     31  GetConfig (config, "global.end",     "%s",  0, global[0].argv[6]);
     32  GetConfig (config, "global.pid",     "%s",  0, global[0].argv[7]);
    4633
    4734  ScanConfig (config, "global.timeout", "%lf", 0, &timeout);
     
    7764    /* connect this process success queue */
    7865    sprintf (field, "%s.success", process[i][0].name);
    79     if (!ScanConfig (config, field, "%s", 0, entry)) {
    80       fprintf (stderr, "missing process.success entry for %s\n", process[i][0].name);
    81       Shutdown (1);
    82     }
     66    GetConfig (config, field, "%s", 0, entry);
    8367    if (!strcasecmp (entry, "global")) {
    8468      process[i][0].success = global[0].success;
     
    10185    /* connect this process failure queue */
    10286    sprintf (field, "%s.failure", process[i][0].name);
    103     if (!ScanConfig (config, field, "%s", 0, entry)) {
    104       fprintf (stderr, "missing process.failure entry for %s\n", process[i][0].name);
    105       Shutdown (1);
    106     }
     87    GetConfig (config, field, "%s", 0, entry);
    10788    if (!strcasecmp (entry, "global")) {
    10889      process[i][0].failure = global[0].failure;
     
    141122
    142123}
     124
     125void GetConfig (char *config, char *field, char *format, int N, void *ptr) {
     126
     127  char *status;
     128
     129  status = ScanConfig (config, field, format, N, ptr);
     130  if (status == NULL) {
     131    fprintf (stderr, "error in config, cannot find required field %s\n", field);
     132    Shutdown (1);
     133  }
     134  return;
     135}
  • trunk/Ohana/src/elixir/src/MachineOps.c

    r3648 r4772  
    410410
    411411  fprintf (stderr, "can't find this machine, process combination!\n");
    412   fprintf (stderr, "machine: %x, process: %x\n", (unsigned int) machine, (unsigned int) process);
     412  fprintf (stderr, "machine: %lx, process: %lx\n", (size_t) machine, (size_t) process);
    413413  return;
    414414}
     
    437437
    438438  fprintf (stderr, "can't find an active process for this machine!\n");
    439   fprintf (stderr, "machine: %x\n", (unsigned int) machine);
     439  fprintf (stderr, "machine: %lx\n", (size_t) machine);
    440440
    441441}
  • trunk/Ohana/src/elixir/src/MsgOps.c

    r3648 r4772  
    3636  int nbytes, Nbytes, NBYTES;
    3737  char *buffer;
    38   int fd, state, mode;
     38  int state, mode;
    3939  FILE *f;
    4040
     
    7676 
    7777  mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
    78   chmod (f, mode);
     78  chmod (fifo, mode);
    7979  fclearlockfile (fifo, f, LCK_XCLD, &state);
    8080 
     
    9191int WriteMsg (char *fifo, char *message) {
    9292
    93   int fd, state, mode;
     93  int state, mode;
    9494  FILE *f;
    9595
  • trunk/Ohana/src/gastro/src/plotstuff.c

    r2435 r4772  
    6262  write (Xgraph[N], "DBOX", 4);
    6363  sprintf (buffer, "%f %f %f %f ", graphmode[0].xmin, graphmode[0].xmax, graphmode[0].ymin, graphmode[0].ymax);
    64   sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
     64  sprintf (buffer2, "NBYTES: %6d ", (unsigned int) strlen (buffer));
    6565  write (Xgraph[N], buffer2, 16);
    6666  write (Xgraph[N], buffer, strlen (buffer));
    6767
    6868  sprintf (buffer, "%s %s %s", "2222", "2222", "2222");
    69   sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
     69  sprintf (buffer2, "NBYTES: %6d ", (unsigned int) strlen (buffer));
    7070  write (Xgraph[N], buffer2, 16);
    7171  write (Xgraph[N], buffer, strlen (buffer));
     
    9797           graphmode[0].etype, graphmode[0].color,
    9898           graphmode[0].lweight, graphmode[0].size);
    99   sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
     99  sprintf (buffer2, "NBYTES: %6d ", (unsigned int) strlen (buffer));
    100100  write (Xgraph[N], buffer2, 16);
    101101  write (Xgraph[N], buffer, strlen (buffer));
     
    104104           graphmode[0].xmin, graphmode[0].xmax,
    105105           graphmode[0].ymin, graphmode[0].ymax);
    106   sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
     106  sprintf (buffer2, "NBYTES: %6d ", (unsigned int) strlen (buffer));
    107107  write (Xgraph[N], buffer2, 16);
    108108  write (Xgraph[N], buffer, strlen (buffer));
  • trunk/Ohana/src/gastro2/src/plotstuff.c

    r2442 r4772  
    6262  write (Xgraph[N], "DBOX", 4);
    6363  sprintf (buffer, "%f %f %f %f", graphmode[0].xmin, graphmode[0].xmax, graphmode[0].ymin, graphmode[0].ymax);
    64   sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
     64  sprintf (buffer2, "NBYTES: %6d", (unsigned int) strlen (buffer));
    6565  write (Xgraph[N], buffer2, 16);
    6666  write (Xgraph[N], buffer, strlen (buffer));
    6767
    6868  sprintf (buffer, "%s %s %s", "2222", "2222", "2222");
    69   sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
     69  sprintf (buffer2, "NBYTES: %6d", (unsigned int) strlen (buffer));
    7070  write (Xgraph[N], buffer2, 16);
    7171  write (Xgraph[N], buffer, strlen (buffer));
     
    9797           graphmode[0].etype, graphmode[0].ebar, graphmode[0].color,
    9898           graphmode[0].lweight, graphmode[0].size);
    99   sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
     99  sprintf (buffer2, "NBYTES: %6d", (unsigned int) strlen (buffer));
    100100  write (Xgraph[N], buffer2, 16);
    101101  write (Xgraph[N], buffer, strlen (buffer));
     
    104104           graphmode[0].xmin, graphmode[0].xmax,
    105105           graphmode[0].ymin, graphmode[0].ymax);
    106   sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
     106  sprintf (buffer2, "NBYTES: %6d", (unsigned int) strlen (buffer));
    107107  write (Xgraph[N], buffer2, 16);
    108108  write (Xgraph[N], buffer, strlen (buffer));
  • trunk/Ohana/src/gastro2/src/rfits.c

    r3520 r4772  
    44
    55  int i, N, Nstars;
    6   Matrix matrix;
    76  Header theader;
    87  FTable table;
  • trunk/Ohana/src/imregister/imphot/args.c

    r4024 r4772  
    9595    exit (1);
    9696  }
     97  return (TRUE);
    9798}
  • trunk/Ohana/src/imregister/src/imstatreg.c

    r3650 r4772  
    11# include "imregister.h"
    22# include "imreg.h"
    3 static char *version = "imstatreg $Revision: 3.13 $";
     3static char *version = "imstatreg $Revision: 3.14 $";
    44
    55int main (int argc, char **argv) {
    66 
    7   int i, child, status;
     7  int i, child;
    88  int *match, Nmatch, Nimage, Nsubset;
    99  FILE *f;
  • trunk/Ohana/src/kapa/graph/LoadObject.c

    r4769 r4772  
    174174  }
    175175  if (Ninpts != Npts*sizeof(float)) { 
    176     fprintf (stderr, "error: expected %d bytes, but got only %d\n", Ninpts, Npts*sizeof(float));
     176    fprintf (stderr, "error: expected %d bytes, but got only %d\n", Ninpts, (unsigned int)(Npts*sizeof(float)));
    177177    return (FALSE);
    178178  }
  • trunk/Ohana/src/libautocode/def/autocode.h

    r3515 r4772  
    44$STRUCT *fits_table_get_$STRUCT (FTable *table, int *Ndata);
    55int      fits_table_set_$STRUCT (FTable *ftable, $STRUCT *data, int Ndata);
     6int      fits_table_mkheader_$STRUCT (Header *header);
    67int      fits_convert_$STRUCT ($STRUCT *data, int size, int nitems);
  • trunk/Ohana/src/misc/src/applyscat.c

    r2417 r4772  
    11# include <ohana.h>
     2# include <dvo.h>
    23# define BYTES_STAR 66
    34
  • trunk/Ohana/src/misc/src/ftable.c

    r2417 r4772  
    77void list_extnames (char *file);
    88void print_layout (Header *header);
     9int   ByteSwap (char *ptr, int size, int nitems, char *type);
    910int Binary;
    1011
  • trunk/Ohana/src/misc/src/mkfringetable.c

    r2448 r4772  
    11# include <ohana.h>
    2 static char *version = "mkfringetable $Revision: 1.3 $";
     2static char *version = "mkfringetable $Revision: 1.4 $";
    33
    44void get_version (int argc, char **argv, char *version);
     
    5454  }
    5555  status = TRUE;
    56   status = status && (int) ScanConfig (layout, "NCCD",    "%d", 1, &Nccd);
    57   status = status && (int) ScanConfig (layout, "FILTER",  "%s", 1, filter);
    58   status = status && (int) ScanConfig (layout, "CAMERA",  "%s", 1, camera);
    59   status = status && (int) ScanConfig (layout, "TVSTOP",  "%s", 1, stop);
    60   status = status && (int) ScanConfig (layout, "TVSTART", "%s", 1, start);
     56  status = status && (NULL == ScanConfig (layout, "NCCD",    "%d", 1, &Nccd));
     57  status = status && (NULL == ScanConfig (layout, "FILTER",  "%s", 1, filter));
     58  status = status && (NULL == ScanConfig (layout, "CAMERA",  "%s", 1, camera));
     59  status = status && (NULL == ScanConfig (layout, "TVSTOP",  "%s", 1, stop));
     60  status = status && (NULL == ScanConfig (layout, "TVSTART", "%s", 1, start));
    6161  if (!status) {
    6262    fprintf (stderr, "error in layout file\n");
  • trunk/Ohana/src/mosastro/include/mosastro.h

    r3520 r4772  
    204204void wfits (char *filename, SMPData *stars, int Nstars, Header *header);
    205205int ConvertMatch (MatchData *data, int size, int nitems);
     206void SaveResiduals (FILE *f, Header *header);
  • trunk/Ohana/src/mosastro/src/match.c

    r3466 r4772  
    66  int i, j, k, K, Ntotal;
    77  int Nmatch, NMATCH;
    8   double dp, dq, radius, Radius, exptime;
     8  double dp, dq, radius, Radius;
    99  double *p, *q, *P, *Q;
    1010  int *U, *u;
  • trunk/Ohana/src/opihi/pantasks/CheckSystem.c

    r4767 r4772  
    66
    77int CheckSystem () {
    8 
    9   float dtime;
    10   struct timeval now;
    118
    129  gettimeofday (&start, (void *) NULL);
  • trunk/Ohana/src/opihi/pclient/ChildOps.c

    r4763 r4772  
    2929
    3030  int Nread;
    31   pid_t ppid;
    3231  double dtime;
    3332  struct timeval now;
  • trunk/Ohana/src/opihi/pcontrol/CheckHost.c

    r4763 r4772  
    33int CheckHost (Host *host) {
    44 
    5   int N, status;
     5  int status;
    66  IOBuffer buffer;
    77  Job *job;
Note: See TracChangeset for help on using the changeset viewer.