VirtualBox

Changeset 54067 in vbox for trunk/src/bldprogs/VBoxTpG.cpp


Ignore:
Timestamp:
Feb 3, 2015 11:12:16 AM (10 years ago)
Author:
vboxsync
Message:

try address the 'char *' conversion warnings on solaris.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/VBoxTpG.cpp

    r47518 r54067  
    11831183                        ScmStreamPrintf(pStrm, ", (%s)%M", pArg->pszTracerType, pszFmt, pArg->pszName);
    11841184                }
     1185                else if (pArg->fType & VTG_TYPE_CONST_CHAR_PTR)
     1186                {
     1187                    /* Casting from 'const char *' (probe) to 'char *' (dtrace) is required to shut up warnings. */
     1188                    pszFmt += sizeof(", ") - 1;
     1189                    if (RTListNodeIsFirst(&pProbe->ArgHead, &pArg->ListEntry))
     1190                        ScmStreamPrintf(pStrm, "(char *)%M", pszFmt, pArg->pszName);
     1191                    else
     1192                        ScmStreamPrintf(pStrm, ", (char *)%M", pszFmt, pArg->pszName);
     1193                }
    11851194                else
    11861195                {
     
    16531662     * Try detect pointers.
    16541663     */
    1655     if (pszType[cchType - 1] == '*')    return VTG_TYPE_POINTER;
     1664    if (pszType[cchType - 1] == '*')
     1665    {
     1666        if (MY_STRMATCH("const char *")) return VTG_TYPE_POINTER | VTG_TYPE_CONST_CHAR_PTR;
     1667        return VTG_TYPE_POINTER;
     1668    }
    16561669    if (pszType[cchType - 1] == '&')
    16571670    {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette