Ignore:
Timestamp:
Feb 9, 2011, 5:42:52 AM (11 years ago)
Author:
jordan
Message:

(trunk libt) silence a couple of identical compiler warnings: "ignoring return value of ‘getcwd’, declared with attribute warn_unused_result".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/remote.c

    r11809 r11864  
    490490tr_getcwd( void )
    491491{
     492    char * result;
    492493    char buf[2048];
    493494    *buf = '\0';
    494495#ifdef WIN32
    495     _getcwd( buf, sizeof( buf ) );
     496    result = _getcwd( buf, sizeof( buf ) );
    496497#else
    497     getcwd( buf, sizeof( buf ) );
     498    result = getcwd( buf, sizeof( buf ) );
    498499#endif
     500    if( result == NULL )
     501        fprintf( stderr, "getcwd error: \"%s\"", tr_strerror( errno ) );
    499502    return tr_strdup( buf );
    500503}
Note: See TracChangeset for help on using the changeset viewer.