Fix compiler warnings

clang version 3.9.1-svn281634-1~exp1 (branches/release_39)

freerdp-firerds/libfreerdp/core/channels.c:270:9: warning: returning
      'const WtsApiFunctionTable *' (aka 'const struct _WtsApiFunctionTable *') from a function with
      result type 'PWtsApiFunctionTable' (aka 'struct _WtsApiFunctionTable *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
        return &FreeRDP_WtsApiFunctionTable;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

uwac/libuwac/uwac-display.c:502:12: warning: comparison of
      unsigned enum expression < 0 is always false [-Wtautological-compare]
        if (error < 0 || error >= UWAC_ERROR_LAST)
            ~~~~~ ^ ~
This commit is contained in:
Bernhard Miklautz 2016-10-04 16:04:20 +02:00 committed by Armin Novak
parent 143b875a4a
commit ddced3f3ca
2 changed files with 2 additions and 2 deletions

View File

@ -267,5 +267,5 @@ static const WtsApiFunctionTable FreeRDP_WtsApiFunctionTable =
PWtsApiFunctionTable FreeRDP_InitWtsApi(void)
{
return &FreeRDP_WtsApiFunctionTable;
return (PWtsApiFunctionTable)&FreeRDP_WtsApiFunctionTable;
}

View File

@ -499,7 +499,7 @@ static const char *errorStrings[] = {
};
const char *UwacErrorString(UwacReturnCode error) {
if (error < 0 || error >= UWAC_ERROR_LAST)
if (error < UWAC_SUCCESS || error >= UWAC_ERROR_LAST)
return "invalid error code";
return errorStrings[error];