Remove unused variables in bin/ps

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Remove unused variables in bin/ps

Daniel Kovacic
Hi,
I stumbled upon some compiler warnings in bin/.

This diff removes two unused variables in bin/ps/print.c.

I hope that such tiny contributions are welcome.
For me, it's a test of whether I am contributing the right way.

diff --git bin/ps/print.c bin/ps/print.c
index 71d4a72a842..c10d8aa0523 100644
--- bin/ps/print.c
+++ bin/ps/print.c
@@ -305,8 +305,7 @@ printstate(const struct kinfo_proc *kp, VARENT *ve)
  void
  printpledge(const struct kinfo_proc *kp, VARENT *ve)
  {
- int flag, i;
- char *cp, state = '\0';
+ int i;
  VAR *v;
  char buf[1024];

Reply | Threaded
Open this post in threaded view
|

Re: Remove unused variables in bin/ps

Klemens Nanni-2
On Sun, Feb 14, 2021 at 03:21:45PM +0100, Daniel Kovacic wrote:
> I stumbled upon some compiler warnings in bin/.
>
> This diff removes two unused variables in bin/ps/print.c.
>
> I hope that such tiny contributions are welcome.
> For me, it's a test of whether I am contributing the right way.
All good, I just committed your diff, thanks.