IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 27, 2005, 3:22:30 PM (21 years ago)
Author:
eugene
Message:

fixed signed-ness of pointers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/matrix/F_write_M.c

    r5238 r5851  
    4141  perpix = abs(matrix[0].bitpix) / 8;
    4242  if (perpix > 1) {
    43     byte0 = (char *) matrix[0].buffer;
    44     byte1 = (char *) matrix[0].buffer + 1;
    45     byte2 = (char *) matrix[0].buffer + 2;
    46     byte3 = (char *) matrix[0].buffer + 3;
    47     byte4 = (char *) matrix[0].buffer + 4;
    48     byte5 = (char *) matrix[0].buffer + 5;
    49     byte6 = (char *) matrix[0].buffer + 6;
    50     byte7 = (char *) matrix[0].buffer + 7;
     43    byte0 = (unsigned char *) matrix[0].buffer;
     44    byte1 = (unsigned char *) matrix[0].buffer + 1;
     45    byte2 = (unsigned char *) matrix[0].buffer + 2;
     46    byte3 = (unsigned char *) matrix[0].buffer + 3;
     47    byte4 = (unsigned char *) matrix[0].buffer + 4;
     48    byte5 = (unsigned char *) matrix[0].buffer + 5;
     49    byte6 = (unsigned char *) matrix[0].buffer + 6;
     50    byte7 = (unsigned char *) matrix[0].buffer + 7;
    5151    if (perpix == 2) {
    5252      for (i = 0; i < nbytes; i+=2, byte0 += 2, byte1 += 2) {
     
    9393  perpix = abs(matrix[0].bitpix) / 8;
    9494  if (perpix > 1) {
    95     byte0 = (char *) matrix[0].buffer;
    96     byte1 = (char *) matrix[0].buffer + 1;
    97     byte2 = (char *) matrix[0].buffer + 2;
    98     byte3 = (char *) matrix[0].buffer + 3;
    99     byte4 = (char *) matrix[0].buffer + 4;
    100     byte5 = (char *) matrix[0].buffer + 5;
    101     byte6 = (char *) matrix[0].buffer + 6;
    102     byte7 = (char *) matrix[0].buffer + 7;
     95    byte0 = (unsigned char *) matrix[0].buffer;
     96    byte1 = (unsigned char *) matrix[0].buffer + 1;
     97    byte2 = (unsigned char *) matrix[0].buffer + 2;
     98    byte3 = (unsigned char *) matrix[0].buffer + 3;
     99    byte4 = (unsigned char *) matrix[0].buffer + 4;
     100    byte5 = (unsigned char *) matrix[0].buffer + 5;
     101    byte6 = (unsigned char *) matrix[0].buffer + 6;
     102    byte7 = (unsigned char *) matrix[0].buffer + 7;
    103103    if (perpix == 2) {
    104104      for (i = 0; i < nbytes; i+=2, byte0 += 2, byte1 += 2) {
Note: See TracChangeset for help on using the changeset viewer.