From: kanschat Date: Wed, 29 Sep 2010 21:17:46 +0000 (+0000) Subject: eliminate compiler warnings X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d0d5544b80c63f06176f517c8e3d69cbabef9a9;p=dealii-svn.git eliminate compiler warnings git-svn-id: https://svn.dealii.org/trunk@22199 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/sparse_direct.cc b/deal.II/lac/source/sparse_direct.cc index 31ba2e1bb3..89f579355e 100644 --- a/deal.II/lac/source/sparse_direct.cc +++ b/deal.II/lac/source/sparse_direct.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by the deal.II authors +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -403,8 +403,12 @@ SparseDirectMA27::~SparseDirectMA27() { // close down client Threads::ThreadMutex::ScopedLock lock (detached_mode_data->mutex); - write (detached_mode_data->server_client_pipe[1], "7", 1); - + // Assign the result of write + // and reset the variable to + // avoid compiler warnings +//TODO:[WB] Should t be used to trace errors? + ssize_t t = write (detached_mode_data->server_client_pipe[1], "7", 1); + t = 0; // then also delete data delete detached_mode_data; detached_mode_data = 0; @@ -452,8 +456,13 @@ SparseDirectMA27::initialize (const SparsityPattern &sp) // write and from which the // slave process will read its // stdin - pipe(detached_mode_data->server_client_pipe); - pipe(detached_mode_data->client_server_pipe); + + // Assign the return value to a + // variable to avoid compiler + // warnings +//TODO:[WB] Use t to trace errors? + int t = pipe(detached_mode_data->server_client_pipe); + t = pipe(detached_mode_data->client_server_pipe); // fflush(NULL) is said to be a // good idea before fork()