[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] compile fs-test.c with non-gcc compiler

From: D. J. Hagberg <dh114027_at_central.sun.com>
Date: 2002-09-13 00:34:27 CEST

* fs-test.c
  (check_related) File failed compilation with Sun/Forte cc compiler
  due to struct assignment. This fix changes pr1 and pr2 to be
  assigned as pointers and dereferenced as pointers. SunPro cc
  doesn't seem to follow the convention of bitwise copies of
  structs on assignments. The exact error message is:
"subversion/tests/libsvn_fs/fs-test.c", line 5170: left operand must be modifiable lvalue: op "="
"subversion/tests/libsvn_fs/fs-test.c", line 5171: left operand must be modifiable lvalue: op "="
cc: acomp failed for subversion/tests/libsvn_fs/fs-test.c
make: *** [subversion/tests/libsvn_fs/fs-test.o] Error 2

Index: subversion/tests/libsvn_fs/fs-test.c
===================================================================
--- subversion/tests/libsvn_fs/fs-test.c
+++ subversion/tests/libsvn_fs/fs-test.c Mon Sep 9 13:38:01 2002
@@ -5167,18 +5167,18 @@
       {
         for (j = 0; j < 16; j++)
           {
- struct path_rev_t pr1 = path_revs[i];
- struct path_rev_t pr2 = path_revs[j];
+ struct path_rev_t *pr1 = &(path_revs[i]);
+ struct path_rev_t *pr2 = &(path_revs[j]);
             const svn_fs_id_t *id1, *id2;
             int related = 0;
 
             /* Get the ID for the first path/revision combination. */
- SVN_ERR (svn_fs_revision_root (&rev_root, fs, pr1.rev, pool));
- SVN_ERR (svn_fs_node_id (&id1, rev_root, pr1.path, pool));
+ SVN_ERR (svn_fs_revision_root (&rev_root, fs, pr1->rev, pool));
+ SVN_ERR (svn_fs_node_id (&id1, rev_root, pr1->path, pool));
           
             /* Get the ID for the second path/revision combination. */
- SVN_ERR (svn_fs_revision_root (&rev_root, fs, pr2.rev, pool));
- SVN_ERR (svn_fs_node_id (&id2, rev_root, pr2.path, pool));
+ SVN_ERR (svn_fs_revision_root (&rev_root, fs, pr2->rev, pool));
+ SVN_ERR (svn_fs_node_id (&id2, rev_root, pr2->path, pool));
             
             /* <exciting> Now, run the relationship check! </exciting> */
             related = svn_fs_check_related (id1, id2);
@@ -5191,14 +5191,14 @@
                 return svn_error_createf
                   (SVN_ERR_TEST_FAILED, 0, NULL, pool,
                    "expected `%s:%d' to be related to `%s:%d'; it was not",
- pr1.path, (int)pr1.rev, pr2.path, (int)pr2.rev);
+ pr1->path, (int)pr1->rev, pr2->path, (int)pr2->rev);
               }
             else if ((! related) && related_matrix[i][j])
               {
                 return svn_error_createf
                   (SVN_ERR_TEST_FAILED, 0, NULL, pool,
                    "expected `%s:%d' to not be related to `%s:%d'; it was",
- pr1.path, (int)pr1.rev, pr2.path, (int)pr2.rev);
+ pr1->path, (int)pr1->rev, pr2->path, (int)pr2->rev);
               }
 
             svn_pool_clear (subpool);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 13 00:43:16 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.