Changeset 8a3cab0 in buchla-68k for ram/etitim.c


Ignore:
Timestamp:
11/12/2017 08:43:41 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
7fcfade
Parents:
ffce2bc
Message:

Fixed etitim.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/etitim.c

    rffce2bc r8a3cab0  
    2727        sc = 1000L;
    2828        tt = timeto(curfunc, subj);
    29         th = tt / sc;
    30         tl = tt - (th * sc);
     29        th = (int16_t)(tt / sc);
     30        tl = (int16_t)(tt - (th * sc));
    3131
    3232        sprintf(ebuf, "%02d.%03d", th, tl);
     
    6464
    6565        for (i = 0; i < 2; i++)         /* convert from ASCII to binary */
    66                 tmpval = (tmpval * 10) + (ebuf[i] - '0');
     66                tmpval = (tmpval * 10) + (uint16_t)(ebuf[i] - '0');
    6767
    6868        for (i = 3; i < 6; i++)
    69                 tmpval = (tmpval * 10) + (ebuf[i] - '0');
     69                tmpval = (tmpval * 10) + (uint16_t)(ebuf[i] - '0');
    7070#if DEBUGIT
    7171        printf("ef_itim(): subj=%d, case=%d, min=%d, val=%d, max=%d\r\n",
     
    103103        sc = 1000L;
    104104        tt = timeto(curfunc, subj);
    105         th = tt / sc;
    106         tl = tt - (th * sc);
     105        th = (int16_t)(tt / sc);
     106        tl = (int16_t)(tt - (th * sc));
    107107
    108108        sprintf(dspbuf, "%02d.%03d", th, tl);   /* convert to ASCII */
     
    132132                return(FAILURE);
    133133
    134         ebuf[ec] = k + '0';
     134        ebuf[ec] = (int8_t)(k + '0');
    135135        ebuf[2] = '.';
    136136        ebuf[6] = '\0';
    137137
    138         dspbuf[0] = k + '0';
     138        dspbuf[0] = (int8_t)(k + '0');
    139139        dspbuf[1] = '\0';
    140140
Note: See TracChangeset for help on using the changeset viewer.