r6501: correct deprecated lvalue casts in testsuite/libsmbclient
authorDerrell Lipman <derrell@samba.org>
Wed, 27 Apr 2005 14:05:02 +0000 (14:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:43 +0000 (10:56 -0500)
(This used to be commit 6d22c3c3434812d3a6ab7f216bec34cdb3b622a0)

examples/libsmbclient/testutime.c
testsuite/libsmbclient/src/getdents/getdents_3.c
testsuite/libsmbclient/src/lseekdir/lseekdir_5.c
testsuite/libsmbclient/src/lseekdir/lseekdir_6.c
testsuite/libsmbclient/src/telldir/telldir_5.c

index 3a1540c..e94777a 100644 (file)
@@ -16,6 +16,7 @@ int main(int argc, char * argv[])
     char            ctime[32];
     char            atime[32];
     char *          pSmbPath = NULL;
+    struct tm       tm;
     struct stat     st;
     struct utimbuf  utimbuf;
     
@@ -53,7 +54,7 @@ int main(int argc, char * argv[])
            st.st_ctime, ctime_r(&st.st_ctime, ctime),
            st.st_atime, ctime_r(&st.st_atime, atime)); 
     
-    utimbuf.actime = st.st_atime - 120;  /* unchangable.  this one wont change */
+    utimbuf.actime = st.st_atime - 120;  /* unchangable (wont change) */
     utimbuf.modtime = st.st_mtime - 120; /* this one should succeed */
     if (smbc_utime(pSmbPath, &utimbuf) < 0)
     {
index 58c8f70..cea0ae2 100644 (file)
@@ -135,8 +135,8 @@ int main(int argc, char** argv)
 
                        }
 
-                       (char *)dirptr += direntsize;
-                       (char *)diramount -= direntsize;
+                       dirptr = (struct smbc_dirent *) ((char *) dirptr + direntsize);
+                       diramount -= direntsize;
                        j++;
 
                }
index 08af806..86b8e34 100644 (file)
@@ -101,7 +101,7 @@ int main(int argc, char** argv)
                                break;
                        }
 
-                       (char*)dirsize += dirptr->dirlen;
+                       dirsize += dirptr->dirlen;
 
                }
                
index 543cbaf..25bbc8d 100644 (file)
@@ -102,7 +102,7 @@ int main(int argc, char** argv)
                                break;
                        }
 
-                       (char*)dirsize += dirptr->dirlen;
+                       dirsize += dirptr->dirlen;
 
                }
                
@@ -112,7 +112,9 @@ int main(int argc, char** argv)
 
                if ( offset != dirsize )
                {
-                       /* printf("offset: %i dirsize: %i\n",offset,dirsize); */
+/*
+                       printf("offset: %i dirsize: %i\n", offset, dirsize);
+*/
                        err = 1;
                }       
 
index 9172b2d..f851e14 100644 (file)
@@ -102,7 +102,7 @@ int main(int argc, char** argv)
                                break;
                        }
 
-                       (char*)dirsize += dirptr->dirlen;
+                       dirsize += dirptr->dirlen;
 
                }
                
@@ -110,7 +110,9 @@ int main(int argc, char** argv)
 
                if ( offset != dirsize )
                {
-                       /* printf("offset: %i dirsize: %i\n",offset,dirsize); */
+/*
+                        printf("offset: %i dirsize: %i\n", offset, dirsize);
+*/
                        err = 1;
                }