IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 5, 2008, 12:58:04 AM (18 years ago)
Author:
Sebastian Jester
Message:

Ignore return value of write in a way that makes compiler happy and avoids avoid compiler warning: "ignoring return value of write, declared with attribute warn_unused_result" - the compiler was too clever for the fix in 1.71 of psLogMsg.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psLogMsg.c

    r20529 r20546  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.71 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2008-11-04 18:36:54 $
     13 *  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2008-11-05 10:58:04 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    315315    *head_ptr = '\0';
    316316
    317     (void)write(logFD, head, strlen(head));
     317    if (write(logFD, head, strlen(head))) {;} // ignore return value
     318   
    318319    if (logMsg) {
    319320        psString msg = NULL;            // Message to print
     
    324325        char *line = strtok_r(msg, "\n", &msgPtr);
    325326        while (line) {
    326             (void)write(logFD, "    ", 4);
    327             (void)write(logFD, line, strlen(line));
    328             (void)write(logFD, "\n", 1);
     327            if(write(logFD, "    ", 4)) {;} // ignore return value
     328            if(write(logFD, line, strlen(line))) {;} // ignore return value
     329            if(write(logFD, "\n", 1)) {;} // ignore return value
    329330            line = strtok_r(NULL, "\n", &msgPtr);
    330331        }
    331332        psFree(msg);
    332333    } else {
    333         (void)write(logFD, "\n", 1);
     334        if(write(logFD, "\n", 1)) {;} // ignore return value
    334335    }
    335336
Note: See TracChangeset for help on using the changeset viewer.