Skip to content

Commit

Permalink
fix a couple compiler warnings/errors (depending on compiler) for Mat…
Browse files Browse the repository at this point in the history
…lab engine code
  • Loading branch information
BarrySmith committed Dec 15, 2013
1 parent 13b05af commit 077a9f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mat/impls/aij/seq/matlab/aijmatlab.c
Expand Up @@ -20,7 +20,7 @@ PETSC_EXTERN mxArray *MatSeqAIJToMatlab(Mat B)

PetscFunctionBegin;
mat = mxCreateSparse(B->cmap->n,B->rmap->n,aij->nz,mxREAL);
ierr = PetscMemcpy(mxGetPr(mat),aij->a,aij->nz*sizeof(PetscScalar));CHKERRQ(ierr);
ierr = PetscMemcpy(mxGetPr(mat),aij->a,aij->nz*sizeof(PetscScalar));if (ierr) return PETSC_NULL;
/* MATLAB stores by column, not row so we pass in the transpose of the matrix */
jj = mxGetIr(mat);
for (i=0; i<aij->nz; i++) jj[i] = aij->j[i];
Expand Down
2 changes: 1 addition & 1 deletion src/sys/classes/viewer/impls/socket/matlab/sopen.c
Expand Up @@ -103,7 +103,6 @@ int establish(u_short portnum)
{
char myname[MAXHOSTNAME+1];
int s;
PetscErrorCode ierr;
struct sockaddr_in sa;
struct hostent *hp;
#if defined(PETSC_HAVE_UNAME)
Expand Down Expand Up @@ -139,6 +138,7 @@ int establish(u_short portnum)

while (bind(s,(struct sockaddr*)&sa,sizeof(sa)) < 0) {
#if defined(PETSC_HAVE_WSAGETLASTERROR)
PetscErrorCode ierr;
ierr = WSAGetLastError();
if (ierr != WSAEADDRINUSE) {
#else
Expand Down

0 comments on commit 077a9f7

Please sign in to comment.