pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Дилян Палаузов <dilyan.palauzov@aegee.org>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: Useless assignments
Date: Mon, 5 Jun 2017 11:23:45 -0700
Message-ID: <20170605182345.j6p2sa2vthjgelof@alap3.anarazel.de> (raw)
In-Reply-To: <4f65a18e-b5bc-8a38-7a9a-d3ab6946da98@aegee.org>
References: <4f65a18e-b5bc-8a38-7a9a-d3ab6946da98@aegee.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Hi,

What's the gain of these changes?  Afaics they're largely minor future
proofing and similar.

- Andres

On 2017-06-05 20:21:39 +0200, Дилян Палаузов wrote:
> diff --git a/src/backend/catalog/partition.c
> b/src/backend/catalog/partition.c
> --- a/src/backend/catalog/partition.c
> +++ b/src/backend/catalog/partition.c
> @@ -189,7 +189,6 @@ RelationBuildPartitionDesc(Relation rel)
>         inhoids = find_inheritance_children(RelationGetRelid(rel), NoLock);
> 
>         /* Collect bound spec nodes in a list */
> -       i = 0;
>         partoids = NIL;
>         foreach(cell, inhoids)
>         {
> @@ -1508,7 +1508,6 @@ get_qual_for_range(PartitionKey key,
> PartitionBoundSpec *spec)
> 
>         lower_or_start_datum = list_head(spec->lowerdatums);
>         upper_or_start_datum = list_head(spec->upperdatums);
> -       num_or_arms = key->partnatts;
> 
>         /*
>          * A range-partitioned table does not currently allow partition keys
> to be
> diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
> --- a/src/backend/storage/smgr/md.c
> +++ b/src/backend/storage/smgr/md.c
> @@ -872,7 +872,7 @@ mdwrite(SMgrRelation reln, ForkNumber forknum,
> BlockNumber blocknum,
>  BlockNumber
>  mdnblocks(SMgrRelation reln, ForkNumber forknum)
>  {
> -       MdfdVec    *v = mdopen(reln, forknum, EXTENSION_FAIL);
> +       MdfdVec    *v; mdopen(reln, forknum, EXTENSION_FAIL);
>         BlockNumber nblocks;
>         BlockNumber segno = 0;
> 
> diff --git a/src/backend/utils/adt/jsonfuncs.c
> b/src/backend/utils/adt/jsonfuncs.c
> --- a/src/backend/utils/adt/jsonfuncs.c
> +++ b/src/backend/utils/adt/jsonfuncs.c
> @@ -4423,7 +4423,7 @@ IteratorConcat(JsonbIterator **it1, JsonbIterator
> **it2,
>                                 rk2;
> 
>         r1 = rk1 = JsonbIteratorNext(it1, &v1, false);
> -       r2 = rk2 = JsonbIteratorNext(it2, &v2, false);
> +       rk2 = JsonbIteratorNext(it2, &v2, false);
> 
>         /*
>          * Both elements are objects.
> diff --git a/src/fe_utils/print.c b/src/fe_utils/print.c
> --- a/src/fe_utils/print.c
> +++ b/src/fe_utils/print.c
> @@ -433,7 +433,6 @@ print_unaligned_text(const printTableContent *cont, FILE
> *fout)
>                                 if (need_recordsep)
>                                 {
> 
> print_separator(cont->opt->recordSep, fout);
> -                                       need_recordsep = false;
>                                 }
>                                 fputs(f->data, fout);
>                                 need_recordsep = true;
> diff --git a/src/backend/replication/logical/worker.c
> b/src/backend/replication/logical/worker.c
> --- a/src/backend/replication/logical/worker.c
> +++ b/src/backend/replication/logical/worker.c
> @@ -1202,7 +1202,6 @@ LogicalRepApplyLoop(XLogRecPtr last_received)
>                                         if (now >= timeout)
>                                         {
>                                                 requestReply = true;
> -                                               ping_sent = true;
>                                         }
>                                 }
>                         }
> 
> 
> -- 
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <20170605182345.j6p2sa2vthjgelof@alap3.anarazel.de>
Permalink:  ../20170605182345.j6p2sa2vthjgelof@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20170605182345.j6p2sa2vthjgelof@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, dilyan.palauzov@aegee.org
  Subject: Re: Useless assignments
  In-Reply-To: <20170605182345.j6p2sa2vthjgelof@alap3.anarazel.de>
  References: <4f65a18e-b5bc-8a38-7a9a-d3ab6946da98@aegee.org> <20170605182345.j6p2sa2vthjgelof@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox