pkgsrc-Changes-HG archive

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

pkgsrc: fix bugs found by gcc-6



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2b6f84d2788c
branches:  trunk
changeset: 306335:2b6f84d2788c
user:      christos <christos%pkgsrc.org@localhost>
date:      Sat Apr 14 22:13:16 2018 +0000
description:
fix bugs found by gcc-6

diffstat:

 chat/i2cbd/distinfo                     |   6 ++--
 chat/i2cbd/patches/patch-src_access.c   |  30 +++++++++++++++++++++-------
 chat/i2cbd/patches/patch-src_s__group.c |  34 ++++++++++++++++++++++++++------
 3 files changed, 52 insertions(+), 18 deletions(-)

diffs (154 lines):

diff -r 315b8087d8c7 -r 2b6f84d2788c chat/i2cbd/distinfo
--- a/chat/i2cbd/distinfo       Sat Apr 14 20:32:14 2018 +0000
+++ b/chat/i2cbd/distinfo       Sat Apr 14 22:13:16 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2017/12/11 07:54:42 spz Exp $
+$NetBSD: distinfo,v 1.19 2018/04/14 22:13:16 christos Exp $
 
 SHA1 (i2cbd-2.0_BETA5.tar.gz) = be219c5b6fa2413681214d756dee02c3cd252843
 RMD160 (i2cbd-2.0_BETA5.tar.gz) = d48988fb175857370c2523c86e0e586decbe28ae
@@ -8,11 +8,11 @@
 SHA1 (patch-ab) = 77627f5771535862530f8a497a16e64bee19075f
 SHA1 (patch-ac) = ca8e6b7324a22fb9ecabf2374e34febb55196e28
 SHA1 (patch-src_Makefile) = c4fb1672fd18c4ff8701a16ed3a023032c6e1991
-SHA1 (patch-src_access.c) = 59ff909eade534eca94a40163066e6812f699f8e
+SHA1 (patch-src_access.c) = adea5db5d0a5c25f6ea830909ee7843112751812
 SHA1 (patch-src_groups.c) = 989cb50a2917a370eda6c8ce2e5085253e24a5d1
 SHA1 (patch-src_ipcf.c) = 757b62b454dac6eb5c3335d4167e753734f03256
 SHA1 (patch-src_main.c) = d28d6d265860c5a47614ef690bc81420230f8627
-SHA1 (patch-src_s__group.c) = b16c754174884ea31f46dade9e7456d8fbb670b0
+SHA1 (patch-src_s__group.c) = 5382184d99828fad165789b7ec1cfa69c812c199
 SHA1 (patch-src_s__info.c) = 5e13e0b8934f45beac84be459ca85d9d089a4d3f
 SHA1 (patch-src_s__user.c) = 8f6571192ca0cdcd6ac29498df2e0940b444d62b
 SHA1 (patch-src_send.c) = 8cc38335b56139220009dcfaf2dc567c1c86cffb
diff -r 315b8087d8c7 -r 2b6f84d2788c chat/i2cbd/patches/patch-src_access.c
--- a/chat/i2cbd/patches/patch-src_access.c     Sat Apr 14 20:32:14 2018 +0000
+++ b/chat/i2cbd/patches/patch-src_access.c     Sat Apr 14 22:13:16 2018 +0000
@@ -1,12 +1,12 @@
-$NetBSD: patch-src_access.c,v 1.3 2017/12/11 07:54:42 spz Exp $
+$NetBSD: patch-src_access.c,v 1.4 2018/04/14 22:13:16 christos Exp $
 
 Fix bounding errors detected by OpenBSD's compiler.
-
+Fix indent errors found by gcc 6
 don't cut off realnames or passwords
 
---- src/access.c.orig  2006-05-11 03:44:52.000000000 +0000
-+++ src/access.c
-@@ -341,7 +341,7 @@ nickreadmsg(int forWhom)
+--- src/access.c.orig  2006-05-10 23:44:52.000000000 -0400
++++ src/access.c       2018-04-14 18:07:48.416319696 -0400
+@@ -341,7 +341,7 @@
                                strncpy(from, data.data, data.size);
                                from[data.size] = '\0';
                        } else
@@ -15,7 +15,7 @@
                        userdb->del(userdb, &key, 0);
  
                        snprintf(kbuf, KEY_SIZE, "%s.message%d", u_tab[forWhom].nickname, i);
-@@ -461,7 +461,7 @@ nickchpass(int forWhom, const char *oldp
+@@ -461,7 +461,7 @@
                strncpy(line, data.data, data.size);
                line[data.size] = '\0';
  
@@ -24,7 +24,7 @@
                        snprintf(line, LINE_SIZE, "Authorization failure");
                        senderror(forWhom, line);
                } else {
-@@ -522,7 +522,7 @@ nickwrite (int forWhom, const char *pass
+@@ -522,7 +522,7 @@
                        snprintf(line, LINE_SIZE, "Nick registered");
                        sends_cmdout(forWhom, line);
  
@@ -33,7 +33,7 @@
                        strlcpy(u_tab[forWhom].password, password, MAX_PASSWDLEN+1);
                        nickwritetime(forWhom, 0);
  
-@@ -581,7 +581,7 @@ nickwrite (int forWhom, const char *pass
+@@ -581,7 +581,7 @@
                snprintf(line, LINE_SIZE, "Nick registered");
                sends_cmdout(forWhom, line);
  
@@ -42,3 +42,17 @@
                strlcpy(u_tab[forWhom].password, password, MAX_PASSWDLEN+1);
                nickwritetime(forWhom, 0);
        }
+@@ -807,11 +807,12 @@
+                                               p++;
+                                       }
+                               }
+-                              if (count > 0)
++                              if (count > 0) {
+                                       strlcpy(temp, "Text: ", LINE_SIZE);
+                                       strlcat(temp, s, LINE_SIZE);
+                                       sends_cmdout(forWhom, temp);
+                               }
++                      }
+               } else {
+                       snprintf(temp, LINE_SIZE, "%s@%s", u_tab[-forWhom].loginid, u_tab[-forWhom].nodeid);
+                       strncpy(line, data.data, data.size);
diff -r 315b8087d8c7 -r 2b6f84d2788c chat/i2cbd/patches/patch-src_s__group.c
--- a/chat/i2cbd/patches/patch-src_s__group.c   Sat Apr 14 20:32:14 2018 +0000
+++ b/chat/i2cbd/patches/patch-src_s__group.c   Sat Apr 14 22:13:16 2018 +0000
@@ -1,10 +1,11 @@
-$NetBSD: patch-src_s__group.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+$NetBSD: patch-src_s__group.c,v 1.2 2018/04/14 22:13:16 christos Exp $
 
 fix copy lengths
+fix indentation for gcc-6
 
---- src/s_group.c.orig 2006-05-11 03:44:53.000000000 +0000
-+++ src/s_group.c
-@@ -260,7 +260,7 @@ s_change(int n, int argc)
+--- src/s_group.c.orig 2006-05-10 23:44:53.000000000 -0400
++++ src/s_group.c      2018-04-14 18:10:07.068923493 -0400
+@@ -260,7 +260,7 @@
                        }
                        /* could create it, so fill in the info */
                        g_tab[ngi].visibility = visibility;
@@ -13,7 +14,7 @@
                        if (strcasecmp("1", n_g_n) != 0) {
                                g_tab[ngi].control = MODERATED;
                                g_tab[ngi].mod = n;
-@@ -326,7 +326,7 @@ s_change(int n, int argc)
+@@ -326,7 +326,7 @@
                /* is the new group different than the old group? */
                if (ngi != ogi) {
                        /* the group exists and we are allowed in. */
@@ -22,7 +23,26 @@
  
                        /* tell the new group about the arrival */
                        snprintf(line, LINE_SIZE, "%s (%s@%s) entered group", u_tab[n].nickname,
-@@ -1056,7 +1056,7 @@ s_topic(int n, int argc)
+@@ -896,12 +896,12 @@
+                                                               nlput(g_tab[gi].n_invites,u_tab[i].nickname);
+                                                          else
+                                                               nlput(g_tab[gi].nr_invites,u_tab[i].nickname);
+-                                                              if (g_tab[gi].mod > 0) {
+-                                                                 snprintf(line, LINE_SIZE, "%s invited",u_tab[i].nickname);
+-                                                                 sendstatus(g_tab[gi].mod, "FYI", line);
+-                                                                 }
+-                                                              snprintf(line, LINE_SIZE, "You are invited to group %s by default.", g_tab[gi].name);
+-                                                              sendstatus(i, "FYI", line);
++                                                          if (g_tab[gi].mod > 0) {
++                                                             snprintf(line, LINE_SIZE, "%s invited",u_tab[i].nickname);
++                                                             sendstatus(g_tab[gi].mod, "FYI", line);
++                                                         }
++                                                         snprintf(line, LINE_SIZE, "You are invited to group %s by default.", g_tab[gi].name);
++                                                         sendstatus(i, "FYI", line);
+                                                       }
+                                               break;
+                                       case SET_MODERATE:
+@@ -1056,7 +1056,7 @@
                                return;
                        }
  
@@ -31,7 +51,7 @@
                        if (g_tab[t_group].volume != QUIET) {
                          snprintf(line, LINE_SIZE, "%s changed the topic to \"%s\"",
                                u_tab[n].nickname,
-@@ -1210,12 +1210,12 @@ set_name(int n, int group, char *name)
+@@ -1210,12 +1210,12 @@
        /* and change their group name entries */
        for (i=0; i< MAX_REAL_USERS; i++) {
                if (strcasecmp(u_tab[i].group, cp) == 0) {



Home | Main Index | Thread Index | Old Index