cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] ccvs/src ChangeLog client.c history.c logmsg.c ...


From: Larry Jones
Subject: [Cvs-cvs] ccvs/src ChangeLog client.c history.c logmsg.c ...
Date: Tue, 18 Nov 2008 22:56:55 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Changes by:     Larry Jones <scjones>   08/11/18 22:56:55

Modified files:
        src            : ChangeLog client.c history.c logmsg.c rcs.c 
                         repos.c tag.c update.c vers_ts.c 

Log message:
        * client.c commit.c, history.c, logmsg.c, rcs.c, repos.c, tag.c,
          update.c, vers_ts.c: Fix gcc -Wall warnings.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3635&r2=1.3636
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/client.c?cvsroot=cvs&r1=1.481&r2=1.482
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/history.c?cvsroot=cvs&r1=1.106&r2=1.107
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/logmsg.c?cvsroot=cvs&r1=1.115&r2=1.116
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/rcs.c?cvsroot=cvs&r1=1.399&r2=1.400
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/repos.c?cvsroot=cvs&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/tag.c?cvsroot=cvs&r1=1.160&r2=1.161
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/update.c?cvsroot=cvs&r1=1.288&r2=1.289
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/vers_ts.c?cvsroot=cvs&r1=1.73&r2=1.74

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3635
retrieving revision 1.3636
diff -u -b -r1.3635 -r1.3636
--- ChangeLog   18 Nov 2008 19:18:16 -0000      1.3635
+++ ChangeLog   18 Nov 2008 22:56:54 -0000      1.3636
@@ -1,8 +1,7 @@
 2008-11-18  Larry Jones  <address@hidden>
 
-       commit.c, update.c: Fix gcc -Wall warnings.
-
-2008-11-18  Larry Jones  <address@hidden>
+       * client.c commit.c, history.c, logmsg.c, rcs.c, repos.c, tag.c,
+         update.c, vers_ts.c: Fix gcc -Wall warnings.
 
        * sanity.sh: Fix nonportable ``date +%s'' test.
 

Index: client.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/client.c,v
retrieving revision 1.481
retrieving revision 1.482
diff -u -b -r1.481 -r1.482
--- client.c    29 Sep 2008 18:16:16 -0000      1.481
+++ client.c    18 Nov 2008 22:56:54 -0000      1.482
@@ -812,7 +812,7 @@
 
     if (!*pathname
        /* or PATHNAME == "./" */
-       || pathname[0] == '.' && ISSLASH (pathname[1]) && !pathname[2])
+       || (pathname[0] == '.' && ISSLASH (pathname[1]) && !pathname[2]))
     {
        /* Old servers always send a trailing '/' on PATHNAME and normalize an
         * UPDATE_DIR of "" or "." to "./".  We have to assume something in
@@ -845,8 +845,7 @@
 
     pdir = dir_name (dir);
     if (!STREQ (pdir, ".") /* Make an exception for the top level directory.  
*/
-       && (!STREQ (cvs_cmd_name, "export") && !hasAdmin (pdir)
-            || STREQ (cvs_cmd_name, "export") && !isdir (pdir)))
+       && !(STREQ (cvs_cmd_name, "export") ? isdir (pdir) : hasAdmin (pdir)))
        error (1, 0, "cannot create directory %s outside working directory",
               quote (dir));
 
@@ -2116,7 +2115,6 @@
 
     /* The base file to be created.  */
     char *basefile;
-    char *update_dir;
     char *fullbase;
 
     /* File buf from net.  May be an RCS diff from PREV to REV.  */

Index: history.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/history.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -b -r1.106 -r1.107
--- history.c   2 Oct 2008 18:44:37 -0000       1.106
+++ history.c   18 Nov 2008 22:56:54 -0000      1.107
@@ -1111,7 +1111,7 @@
     line = cp + 1;
     NEXT_BAR (user);
     NEXT_BAR (dir);
-    if (cp = strrchr (hr->dir, '*'))
+    if ((cp = strrchr (hr->dir, '*')) != NULL)
     {
        *cp++ = '\0';
        hr->end = line + strtoul (cp, NULL, 16);
@@ -1160,7 +1160,7 @@
        default:
            if (!really_quiet && !warned_version)
            {
-               error (0, 0, "unrecognized history record version: %ul",
+               error (0, 0, "unrecognized history record version: %lu",
                       hr->version);
                warned_version = true;
            }
@@ -1576,7 +1576,7 @@
 {
     struct hrec *hr, *lr;
     struct tm *tm;
-    int i, count, ty;
+    int count, ty;
     char *cp;
     int user_len, file_len, rev_len, mod_len, repos_len;
 
@@ -1615,7 +1615,7 @@
        user_len = MAX (user_len, strlen (lr->user));
        if (ty != 'T')
        {
-           if (cp = strrchr (repos, '/'))
+           if ((cp = strrchr (repos, '/')) != NULL)
            {
                if (lr->mod && STREQ (++cp, lr->mod))
                    strcpy (cp, "*");
@@ -1663,14 +1663,14 @@
 
        workdir = xmalloc (strlen (lr->dir) + strlen (lr->end) + 10);
        sprintf (workdir, "%s%s", lr->dir, lr->end);
-       if (cp = strrchr (workdir, '/'))
+       if ((cp = strrchr (workdir, '/')) != NULL)
        {
            if (lr->mod && STREQ (++cp, lr->mod))
                strcpy (cp, "*");
        }
        repos = xmalloc (strlen (lr->repos) + 10);
        strcpy (repos, lr->repos);
-       if (cp = strrchr (repos, '/'))
+       if ((cp = strrchr (repos, '/')) != NULL)
        {
            if (lr->mod && STREQ (++cp, lr->mod))
                strcpy (cp, "*");

Index: logmsg.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/logmsg.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -b -r1.115 -r1.116
--- logmsg.c    19 Sep 2008 17:31:45 -0000      1.115
+++ logmsg.c    18 Nov 2008 22:56:54 -0000      1.116
@@ -208,11 +208,11 @@
 
     if ((tfp = CVS_FOPEN (template, "r")) != NULL)
     {
-       char *line = NULL;
-       size_t line_chars_allocated = 0;
+       char *buff = NULL;
+       size_t buff_chars_allocated = 0;
 
-       while (getline (&line, &line_chars_allocated, tfp) >= 0)
-           (void) fputs (line, fp);
+       while (getline (&buff, &buff_chars_allocated, tfp) >= 0)
+           (void) fputs (buff, fp);
        if (ferror (tfp))
            error (0, errno, "%s:%d: warning: cannot read %s",
                   file, line, quote (template));
@@ -220,8 +220,8 @@
            error (0, errno,
                   "%s:%d: warning: cannot close %s",
                   file, line, quote (template));
-       if (line)
-           free (line);
+       if (buff)
+           free (buff);
        return (0);
     }
     else
@@ -350,8 +350,8 @@
     /* run the editor */
     run_setup (Editor);
     run_add_arg (fname);
-    if (retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY,
-                           RUN_NORMAL | RUN_SIGIGNORE))
+    if ((retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY,
+                            RUN_NORMAL | RUN_SIGIGNORE)) != 0)
        error (0, retcode == -1 ? errno : 0, "warning: editor session failed");
 
     /* put the entire message back into the *messagep variable */
@@ -630,8 +630,8 @@
     data.message = *messagep;
     data.fname = NULL;
     data.changes = changes;
-    if (err = Parse_Info (CVSROOTADM_VERIFYMSG, repository,
-                         verifymsg_proc, 0, &data))
+    if ((err = Parse_Info (CVSROOTADM_VERIFYMSG, repository,
+                         verifymsg_proc, 0, &data)) != 0)
     {
        int saved_errno = errno;
        /* Since following error() exits, delete the temp file now.  */

Index: rcs.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/rcs.c,v
retrieving revision 1.399
retrieving revision 1.400
diff -u -b -r1.399 -r1.400
--- rcs.c       17 Nov 2008 21:18:03 -0000      1.399
+++ rcs.c       18 Nov 2008 22:56:54 -0000      1.400
@@ -300,7 +300,7 @@
     {
        /* Handle the error cases */
     }
-    else if (fp = CVS_FOPEN (rcsfile, FOPEN_BINARY_READ))
+    else if ((fp = CVS_FOPEN (rcsfile, FOPEN_BINARY_READ)) != NULL)
     {
        rcs = RCS_parsercsfile_i (fp, rcsfile);
        if (rcs)

Index: repos.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/repos.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- repos.c     25 Sep 2008 20:31:38 -0000      1.48
+++ repos.c     18 Nov 2008 22:56:55 -0000      1.49
@@ -101,7 +101,7 @@
        error (0, errno, "cannot close %s", quote (tmp));
     free (tmp);
 
-    if (cp = strrchr (repos, '\n'))
+    if ((cp = strrchr (repos, '\n')) != NULL)
        *cp = '\0';                     /* strip the newline */
 
     /* If this is a relative repository pathname, turn it into an absolute
@@ -202,7 +202,7 @@
         * Paths with a leading "//" are special on some early UNIXes.
         */
        if (strlen (repository) == 2
-           || strlen (repository) == 3 && ISSLASH (*repository))
+           || (strlen (repository) == 3 && ISSLASH (*repository)))
            repository[strlen (repository) - 1] = '\0';
        else
            repository[strlen (repository) - 2] = '\0';

Index: tag.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/tag.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -b -r1.160 -r1.161
--- tag.c       2 Oct 2008 18:44:38 -0000       1.160
+++ tag.c       18 Nov 2008 22:56:55 -0000      1.161
@@ -727,7 +727,7 @@
     const char *srepos = Short_Repository (repository);
     struct pretag_proc_data *ppd = closure;
 
-    TRACE (TRACE_FUNCTION, "pretag_proc (%s, %s, %s, %s)",
+    TRACE (TRACE_FUNCTION, "pretag_proc (%s, %s, %s, %d)",
           repository, filter, file, line);
 
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS

Index: update.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/update.c,v
retrieving revision 1.288
retrieving revision 1.289
diff -u -b -r1.288 -r1.289
--- update.c    18 Nov 2008 19:18:16 -0000      1.288
+++ update.c    18 Nov 2008 22:56:55 -0000      1.289
@@ -1029,7 +1029,7 @@
 update_dirleave_proc (void *callerdat, const char *dir, int err,
                       const char *update_dir, List *entries)
 {
-    TRACE (TRACE_FLOW, "update_dirleave_proc (%s, %d, %d)",
+    TRACE (TRACE_FLOW, "update_dirleave_proc (%s, %d, %s)",
           dir, err, update_dir);
 
     /* Delete the ignore list if it hasn't already been done.  */

Index: vers_ts.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/vers_ts.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -b -r1.73 -r1.74
--- vers_ts.c   7 May 2008 16:04:37 -0000       1.73
+++ vers_ts.c   18 Nov 2008 22:56:55 -0000      1.74
@@ -297,7 +297,6 @@
 time_stamp_server (const char *file, Vers_TS *vers_ts, Entnode *entdata)
 {
     struct stat sb;
-    char *cp;
 
     TRACE (TRACE_FUNCTION, "time_stamp_server (%s, %s, %s, %s)",
           file,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]