avoid array overflows and silence compiler warnings from unused parameters

This commit is contained in:
Axel Kohlmeyer
2018-11-20 22:40:46 -05:00
parent 090fc7bc8a
commit a91d89b516
18 changed files with 32 additions and 31 deletions

View File

@ -13,9 +13,9 @@
------------------------------------------------------------------------- */
#include <mpi.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include "msg.h"
@ -23,7 +23,7 @@ using namespace CSLIB_NS;
/* ---------------------------------------------------------------------- */
Msg::Msg(int csflag, const void *ptr, MPI_Comm cworld)
Msg::Msg(int csflag, const void * /* ptr */, MPI_Comm cworld)
{
world = cworld;
MPI_Comm_rank(world,&me);
@ -34,7 +34,7 @@ Msg::Msg(int csflag, const void *ptr, MPI_Comm cworld)
/* ---------------------------------------------------------------------- */
Msg::Msg(int csflag, const void *ptr)
Msg::Msg(int csflag, const void * /* ptr */)
{
world = 0;
me = 0;
@ -57,7 +57,7 @@ void Msg::init(int csflag)
/* ---------------------------------------------------------------------- */
void Msg::allocate(int nheader, int &maxheader, int *&header,
int nbuf, int &maxbuf, char *&buf)
int nbuf, int &maxbuf, char *&buf)
{
if (nheader > maxheader) {
sfree(header);