Commits

BarryFSmith committed 7a3410e

nightly build fixes for unused variables and mix of signed and unsigned operations

Comments (0)

Files changed (3)

src/sys/webclient/box.c

     fd = fopen (filename, "r");
     if (!fd) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_FILE_OPEN,"Unable to open file: %s",filename);
     rd = fread (body+blen, sizeof (unsigned char), sb.st_size, fd);
-    if (rd != sb.st_size) SETERRQ3(PETSC_COMM_SELF,PETSC_ERR_FILE_OPEN,"Unable to read entire file: %s %d %d",filename,(int)rd,sb.st_size);
+    if (rd != (size_t)sb.st_size) SETERRQ3(PETSC_COMM_SELF,PETSC_ERR_FILE_OPEN,"Unable to read entire file: %s %d %d",filename,(int)rd,(int)sb.st_size);
     fclose(fd);
     body[blen + rd] = 0;
     ierr = PetscStrcat(body,"\r\n\r\n"

src/sys/webclient/client.c

 {
   char           *request=0;
   char           contentlength[40],contenttype[80],*path,*host;
-  int            r;
-  size_t         request_len,len,headlen,bodylen,contentlen,pathlen,hostlen,typelen,contenttypelen = 0;
+  size_t         request_len,headlen,bodylen,contentlen,pathlen,hostlen,typelen,contenttypelen = 0;
   PetscErrorCode ierr;
   PetscBool      flg;
 
   ierr = PetscStrallocpy(url,&host);CHKERRQ(ierr);
   ierr = PetscStrchr(host,'/',&path);CHKERRQ(ierr);
   if (!path) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,"url must contain / it is %s",url);
-  *path = NULL;
   ierr = PetscStrlen(host,&hostlen);CHKERRQ(ierr);
 
   ierr = PetscStrchr(url,'/',&path);CHKERRQ(ierr);

src/sys/webclient/textbelt.c

     ierr = PetscStrcat(body,"message=");CHKERRQ(ierr);
     ierr = PetscStrcat(body,message);CHKERRQ(ierr);
     ierr = PetscStrlen(body,&blen);CHKERRQ(ierr);
-    for (i=0; i<blen; i++) {
+    for (i=0; i<(int)blen; i++) {
       if (body[i] == ' ') body[i] = '+';
     }
     ierr = PetscOpenSocket("textbelt.com",80,&sock);CHKERRQ(ierr);