Ignore:
Timestamp:
Oct 4, 2023, 6:18:02 PM (23 months ago)
Author:
gyoung
Message:

Fix all the warnings and errors reported by CPPCheck.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/classes/c/c_common/except.c

    r104 r108  
    16561656                       NrPublic = pubfunc_ofs = sspub32.offset;
    16571657                       read_types = TRUE;
    1658                        sprintf(szNrPub,"%s %s (%s) %04X:%08X\n",
     1658                       sprintf(szNrPub,"%s %s (%s) %04X:%08lu\n",
    16591659                               (sspub32.type==1) ? " Abs" : " ",ename,ModName,
    16601660                               sspub32.segment, sspub32.offset
     
    19021902
    19031903   if (type == 0)
    1904       sprintf(value, "%hd", *(signed char *)varptr);
     1904      sprintf(value, "%hhi", *(signed char *)varptr);
    19051905   else if (type == 1)
    19061906      sprintf(value, "%hd", *(signed short *)varptr);
     
    19181918      sprintf(value, "%f", *(double *)varptr);
    19191919   else if (type == 10)
    1920       sprintf(value, "%f", *(long double *)varptr);
     1920      sprintf(value, "%Lf", *(long double *)varptr);
    19211921   else if (type == 16)
    19221922      sprintf(value, "%s", *(char *)varptr ? "TRUE" : "FALSE");
     
    19281928      sprintf(value, "%c", *(char *)varptr);
    19291929   else if (type == 21)
    1930       sprintf(value, "%lc", *(short *)varptr);
     1930      sprintf(value, "%hi", *(short *)varptr);
    19311931   else if (type == 22)
    19321932      sprintf(value, "%lc", *(long *)varptr);
Note: See TracChangeset for help on using the changeset viewer.