Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r2502 - branches/fsvs-1.2.x/fsvs/src

fsvs
Discussion topic

Back to topic list

svn commit: r2502 - branches/fsvs-1.2.x/fsvs/src

Author pmarek
Full name P.Marek
Date 2018-06-06 04:08:06 PDT
Message Author: pmarek
Date: 2018-06-06 04:08:05-0700
New Revision: 2502

Modified:
   branches/fsvs-1.2.x/​fsvs/src/est_ops.c
   branches/fsvs-1.2.x/​fsvs/src/global.h
   branches/fsvs-1.2.x/​fsvs/src/ignore.c
   branches/fsvs-1.2.x/​fsvs/src/revert.c

Log:
Small random fixes and workarounds for scan-build.

Modified: branches/fsvs-1.2.x/​fsvs/src/est_ops.c
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/src/est_ops.c​?view=diff&pathr​ev=2502&r1=2501​&r2=2502
====================​====================​====================​==================
--- branches/fsvs-1.2.x/​fsvs/src/est_ops.c (original)
+++ branches/fsvs-1.2.x/​fsvs/src/est_ops.c 2018-06-06 04:08:05-0700
@@ -501,6 +501,7 @@
     };
     int is_dir, is_dev, status;
     int intnum;
+ svn_revnum_t revision;
 
 
 #if 0
@@ -524,10 +525,12 @@
         STOPIF( ops__apply_group(sts, NULL, NULL), NULL);
 
 
- if (sts->url)
+ revision = sts->repos_rev;
+ if (sts->url) {
         intnum=sts->url-​>internal_number;
- else
- {
+ if (revision == SET_REVNUM)
+ revision = sts->url->current_rev;
+ } else {
         /* A non-root entry has no url. May happen with _build_list, when
          * there are no urls. */
         if (sts->parent)
@@ -543,7 +546,7 @@
             ( is_dev ? ops__dev_to_waa_string(sts) : "nd" ),
             ( is_dir ? "x" : cs__md5tohex_buffere​d(sts->md5) ),
             (t_ull)sts->st.size,
- sts->repos_rev == SET_REVNUM ? sts->url->current_rev : sts->repos_rev,
+ revision,
             intnum,
             (t_ul)sts->st.dev,
             (t_ull)sts->st.ino,

Modified: branches/fsvs-1.2.x/​fsvs/src/global.h
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/src/global.h?​view=diff&pathre​v=2502&r1=2501​&r2=2502
====================​====================​====================​==================
--- branches/fsvs-1.2.x/​fsvs/src/global.h (original)
+++ branches/fsvs-1.2.x/​fsvs/src/global.h 2018-06-06 04:08:05-0700
@@ -805,7 +805,7 @@
 /** Makes the program abort.
  * If the configure had --enable-debug and \c gdb is in the path, try
  * to use \c gdb to debug this problem (only if STDIN and STDOUT are ttys). */
-#define BUG(...) do { fflush(NULL); debuglevel=1; DEBUGP(__VA_ARGS__); *(int*)42=__LINE__; } while (0)
+#define BUG(...) do { fflush(NULL); debuglevel=1; DEBUGP(__VA_ARGS__); *(int*)42=__LINE__; while(1) sleep(1); } while (0)
 /** The same as BUG(), but conditionalized.
  * \code
  * BUG_ON(a == b, "HELP")

Modified: branches/fsvs-1.2.x/​fsvs/src/ignore.c
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/src/ignore.c?​view=diff&pathre​v=2502&r1=2501​&r2=2502
====================​====================​====================​==================
--- branches/fsvs-1.2.x/​fsvs/src/ignore.c (original)
+++ branches/fsvs-1.2.x/​fsvs/src/ignore.c 2018-06-06 04:08:05-0700
@@ -2015,6 +2015,7 @@
     int i;
     struct ignore_t *ign;
 
+ status = 0;
     STOPIF_CODE_EPIPE( fprintf(output, "\nGrouping statistics ("
                 "tested, matched, groupname, pattern):\n\n"), NULL);
 

Modified: branches/fsvs-1.2.x/​fsvs/src/revert.c
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/src/revert.c?​view=diff&pathre​v=2502&r1=2501​&r2=2502
====================​====================​====================​==================
--- branches/fsvs-1.2.x/​fsvs/src/revert.c (original)
+++ branches/fsvs-1.2.x/​fsvs/src/revert.c 2018-06-06 04:08:05-0700
@@ -430,6 +430,8 @@
 
 
     BUG_ON(!pool);
+ filename_tmp = NULL;
+ url = NULL;
     STOPIF( ops__build_path(&filename, sts), NULL);
 
 
@@ -567,7 +569,7 @@
 ex:
     /* On error remove the temporary file. */
     /* Return the original error. */
- if (status)
+ if (status && filename_tmp)
         unlink(filename_tmp);
 
     return status;

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r2502 - branches/fsvs-1.2.x/fsvs/src pmarek P.Marek 2018-06-06 04:08:06 PDT
Messages per page: