- Timestamp:
- 11/12/2017 08:43:41 PM (7 years ago)
- Branches:
- master
- Children:
- 7fcfade
- Parents:
- ffce2bc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/etitim.c
rffce2bc r8a3cab0 27 27 sc = 1000L; 28 28 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)); 31 31 32 32 sprintf(ebuf, "%02d.%03d", th, tl); … … 64 64 65 65 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'); 67 67 68 68 for (i = 3; i < 6; i++) 69 tmpval = (tmpval * 10) + ( ebuf[i] - '0');69 tmpval = (tmpval * 10) + (uint16_t)(ebuf[i] - '0'); 70 70 #if DEBUGIT 71 71 printf("ef_itim(): subj=%d, case=%d, min=%d, val=%d, max=%d\r\n", … … 103 103 sc = 1000L; 104 104 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)); 107 107 108 108 sprintf(dspbuf, "%02d.%03d", th, tl); /* convert to ASCII */ … … 132 132 return(FAILURE); 133 133 134 ebuf[ec] = k + '0';134 ebuf[ec] = (int8_t)(k + '0'); 135 135 ebuf[2] = '.'; 136 136 ebuf[6] = '\0'; 137 137 138 dspbuf[0] = k + '0';138 dspbuf[0] = (int8_t)(k + '0'); 139 139 dspbuf[1] = '\0'; 140 140
Note:
See TracChangeset
for help on using the changeset viewer.