IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20547


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

Ignore return value of write in a way that really avoids the 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

Location:
trunk/psLib/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psRandom.c

    r15627 r20547  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2007-11-16 00:41:07 $
     12*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2008-11-05 11:12:39 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5050    } else {
    5151        // Read urandom to get seed
    52         fread(&seedVal, sizeof(psU64),1,fd);
     52        if (fread(&seedVal, sizeof(psU64),1,fd)) {;} // ignore return value
    5353        // Close file
    5454        fclose(fd);
  • trunk/psLib/src/mathtypes/psImage.c

    r15454 r20547  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.131 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-11-05 23:42:46 $
     11 *  @version $Revision: 1.132 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2008-11-05 11:12:39 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    545545                     char *name)
    546546{
    547     write(fd,"matrix: ",8);
    548     write(fd,name,strlen(name));
    549     write(fd,"\n",1);
     547    if (write(fd,"matrix: ",8)) {;} //ignore return value
     548    if (write(fd,name,strlen(name))) {;} //ignore return value
     549    if (write(fd,"\n",1)) {;} //ignore return value
    550550
    551551    char buffer[20];
     
    555555        for (int i = 0; i < a->numCols; i++) {
    556556            snprintf (buffer,20, "%f  ", p_psImageGetElementF64(a, i, j));
    557             write(fd,buffer,strlen(buffer));
    558         }
    559         write(fd,"\n",1);
    560     }
    561     write(fd,"\n",1);
     557            if (write(fd,buffer,strlen(buffer))) {;} //ignore return value
     558        }
     559        if (write(fd,"\n",1)) {;} //ignore return value
     560    }
     561    if (write(fd,"\n",1)) {;} //ignore return value
    562562    return (true);
    563563}
  • trunk/psLib/src/mathtypes/psVector.c

    r19502 r20547  
    1010*  @author Joshua Hoblitt, University of Hawaii
    1111*
    12 *  @version $Revision: 1.103 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2008-09-12 00:22:48 $
     12*  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2008-11-05 11:12:40 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    711711
    712712    sprintf (line, "vector: %s\n", name);
    713     write (fd, line, strlen(line));
     713    if (write(fd, line, strlen(line))) {;} //ignore return value
    714714
    715715    for (int i = 0; i < a[0].n; i++) {
    716716        sprintf (line, "%f\n", p_psVectorGetElementF64(a, i));
    717         write (fd, line, strlen(line));
     717        if (write(fd, line, strlen(line))) {;} //ignore return value
    718718    }
    719719    sprintf (line, "\n");
    720     write (fd, line, strlen(line));
     720    if (write(fd, line, strlen(line))) {;} //ignore return value
    721721    return (true);
    722722}
  • trunk/psLib/src/xml/psXML.c

    r9523 r20547  
    1010*  @author David Robbins, MHPCC
    1111*
    12 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2006-10-12 23:43:58 $
     12*  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2008-11-05 11:12:40 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    626626    if ( psXMLDocToMem(doc, buf) ) {
    627627        n = strlen(buf);
    628         write(fd, buf, n);
     628        if (write(fd, buf, n)) {;} //ignore return value
    629629    } else {
    630630        psError(PS_ERR_LOCATION_INVALID, true, _("Buffer to small to store XML doc."));
Note: See TracChangeset for help on using the changeset viewer.