IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 20, 2018, 8:58:31 PM (8 years ago)
Author:
eugene
Message:

add snprintf_nowarn function to avoid compiler warnings from desired snprint truncations

Location:
trunk/Ohana/src/opihi/cmd.data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/imspline_apply.c

    r34584 r40549  
    4747  gfits_create_matrix (&out[0].header, &out[0].matrix);
    4848  if ((y1[0].file[0] != '*') && (y1[0].file[0] != '(')) {
    49     sprintf (out[0].file, "*%s", y1[0].file);
     49    snprintf_nowarn (out[0].file, OPIHI_NAME_SIZE, "*%s", y1[0].file);
    5050  } else {
    51     sprintf (out[0].file, "%s", y1[0].file);
     51    snprintf_nowarn (out[0].file, OPIHI_NAME_SIZE, "%s", y1[0].file);
    5252  }
    5353
  • trunk/Ohana/src/opihi/cmd.data/imspline_construct.c

    r34584 r40549  
    1919  free (out[0].matrix.buffer);
    2020  if ((in[0].file[0] != '*') && (in[0].file[0] != '(')) {
    21     sprintf (out[0].file, "*%s", in[0].file);
     21    snprintf_nowarn (out[0].file, OPIHI_NAME_SIZE, "*%s", in[0].file);
    2222  } else {
    23     sprintf (out[0].file, "%s", in[0].file);
     23    snprintf_nowarn (out[0].file, OPIHI_NAME_SIZE, "%s", in[0].file);
    2424  }
    2525  out[0].bitpix = in[0].bitpix;
Note: See TracChangeset for help on using the changeset viewer.