Thread: unused variable ShmemBootstrap

unused variable ShmemBootstrap

From
Alvaro Herrera
Date:
Patchers,

src/backend/storage/shmem.c contains an unused variable; it's only
assigned to, and used in a couple Assert().  It's been this way since
shmem.c 1.53, which was current on july 2000.

This patch removes it, along with an obsolete comment (which refers to a
file and function that hasn't existed at all in the whole CVS history.)

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"There is evil in the world. There are dark, awful things. Occasionally, we get
a glimpse of them. But there are dark corners; horrors almost impossible to
imagine... even in our worst nightmares." (Van Helsing, Dracula A.D. 1972)

Attachment

Re: unused variable ShmemBootstrap

From
Tom Lane
Date:
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> This patch removes it, along with an obsolete comment (which refers to a
> file and function that hasn't existed at all in the whole CVS history.)

I agree that the code is useless, but exactly which comment are you
complaining of?

            regards, tom lane

Re: unused variable ShmemBootstrap

From
Alvaro Herrera
Date:
On Tue, Mar 29, 2005 at 11:48:57PM -0500, Tom Lane wrote:
> Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> > This patch removes it, along with an obsolete comment (which refers to a
> > file and function that hasn't existed at all in the whole CVS history.)
>
> I agree that the code is useless, but exactly which comment are you
> complaining of?

Oops, somehow I left that parth out of the patch.


*** shmem.c 31 Dec 2004 22:00:56 -0000  1.82
--- shmem.c 30 Mar 2005 14:56:46 -0000
***************
*** 53,61 ****
   *    cannot be redistributed to other tables.  We could build a simple
   *    hash bucket garbage collector if need be.  Right now, it seems
   *    unnecessary.
-  *
-  *        See InitSem() in sem.c for an example of how to use the
-  *    shmem index.
   */

  #include "postgres.h"
--- 53,58 ----


--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"¿Cómo puedes confiar en algo que pagas y que no ves,
y no confiar en algo que te dan y te lo muestran?" (Germán Poo)

Re: unused variable ShmemBootstrap

From
Neil Conway
Date:
Alvaro Herrera wrote:
> Oops, somehow I left that parth out of the patch.

Thanks, both patches applied.

-Neil