IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 26, 2016, 8:31:22 PM (10 years ago)
Author:
eugene
Message:

working on very pedantic gcc to track down memory corruption issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20160226/src/libfits/matrix/F_compress_utils.c

    r38441 r39409  
    1717
    1818typedef struct {
    19   int *ztile; // max size of a tile (edge tiles may be smaller)
     19  unsigned long int *ztile; // max size of a tile (edge tiles may be smaller)
    2020  int *otile; // counter for current tile (eg, for (2,3,0) otile[0] = 2, otile[1] = 3, otile[2] = 0)
    2121  int *ntile; // number of tiles in dimension [i]
     
    2323
    2424// advance the otile counter.
    25 int gfits_imtile_next (Matrix *matrix, int *ztile, int *ntile, int *otile) {
     25int gfits_imtile_next (Matrix *matrix, unsigned long int *ztile, int *ntile, int *otile) {
     26  OHANA_UNUSED_PARAM(ztile);
    2627
    2728  int i;
     
    5354
    5455// how many tiles needed for this image (given ztile[])
    55 int gfits_imtile_count (Matrix *matrix, int *ztile, int *ntile) {
     56int gfits_imtile_count (Matrix *matrix, unsigned long int *ztile, int *ntile) {
    5657
    5758  int i;
     
    6768
    6869// how many tiles needed for this image (given ztile[])
    69 int gfits_imtile_maxsize (Matrix *matrix, int *ztile) {
     70int gfits_imtile_maxsize (Matrix *matrix, unsigned long int *ztile) {
    7071
    7172  int i;
    7273
    73   int max_tile_size = 1;
     74  unsigned long int max_tile_size = 1;
    7475  for (i = 0; i < matrix->Naxes; i++) {
    7576    max_tile_size *= ztile[i];
     
    8081
    8182// true sizes of this tile (in pixels)
    82 off_t gfits_tile_size (Matrix *matrix, int *otile, int *ztile) {
     83off_t gfits_tile_size (Matrix *matrix, int *otile, unsigned long int *ztile) {
    8384
    8485  off_t i, Npixels, Ndimen;
     
    9394}
    9495
    95 int gfits_byteswap_zdata (char *zdata, int Nzdata, int pixsize) {
     96int gfits_byteswap_zdata (char *zdata, off_t Nzdata, int pixsize) {
    9697
    9798# define DOSWAP(A,B) { char tmp = A; A = B; B = tmp; }
     
    99100# ifdef BYTE_SWAP
    100101
    101   int i;
     102  off_t i;
    102103
    103104  // fprintf (stderr, "swapping %d bytes in pix of size %d bytes...\n", Nzdata, pixsize);
Note: See TracChangeset for help on using the changeset viewer.