trinity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Remove unused variable in fds/drm.c.
@ 2015-12-04 10:18 Vinson Lee
  2015-12-04 18:07 ` Dave Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Vinson Lee @ 2015-12-04 10:18 UTC (permalink / raw)
  To: trinity

Fix build error with GCC 5.2.1.

  CC	fds/drm.o
fds/drm.c: In function ‘open_drm_fds’:
fds/drm.c:70:15: error: unused variable ‘i’ [-Werror=unused-variable]
  unsigned int i;
               ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
---
v2 - Fixed typo in commit message.

 fds/drm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fds/drm.c b/fds/drm.c
index b7fc867..4c9b5c5 100644
--- a/fds/drm.c
+++ b/fds/drm.c
@@ -67,7 +67,6 @@ static void add_drm_obj(int fd)
 
 static int open_drm_fds(void)
 {
-	unsigned int i;
 	int fd, dfd;
 	DIR *dir;
 	struct dirent *entry;
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Remove unused variable in fds/drm.c.
  2015-12-04 10:18 [PATCH v2] Remove unused variable in fds/drm.c Vinson Lee
@ 2015-12-04 18:07 ` Dave Jones
  2015-12-04 18:49   ` Vinson Lee
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Jones @ 2015-12-04 18:07 UTC (permalink / raw)
  To: Vinson Lee; +Cc: trinity

On Fri, Dec 04, 2015 at 02:18:52AM -0800, Vinson Lee wrote:
 > Fix build error with GCC 5.2.1.
 > 
 >   CC	fds/drm.o
 > fds/drm.c: In function ‘open_drm_fds’:
 > fds/drm.c:70:15: error: unused variable ‘i’ [-Werror=unused-variable]
 >   unsigned int i;
 >                ^

Applied. I wonder why debian's 5.2.1 didn't pick up on this.
Judging by your other patches, I'm guessing this is Fedora's version ?

	Dave

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Remove unused variable in fds/drm.c.
  2015-12-04 18:07 ` Dave Jones
@ 2015-12-04 18:49   ` Vinson Lee
  0 siblings, 0 replies; 3+ messages in thread
From: Vinson Lee @ 2015-12-04 18:49 UTC (permalink / raw)
  To: Dave Jones; +Cc: trinity

On Fri, Dec 4, 2015 at 10:07 AM, Dave Jones <davej@codemonkey.org.uk> wrote:
> On Fri, Dec 04, 2015 at 02:18:52AM -0800, Vinson Lee wrote:
>  > Fix build error with GCC 5.2.1.
>  >
>  >   CC fds/drm.o
>  > fds/drm.c: In function ‘open_drm_fds’:
>  > fds/drm.c:70:15: error: unused variable ‘i’ [-Werror=unused-variable]
>  >   unsigned int i;
>  >                ^
>
> Applied. I wonder why debian's 5.2.1 didn't pick up on this.
> Judging by your other patches, I'm guessing this is Fedora's version ?
>
>         Dave
>

Yes, the error was from GCC on Fedora.

$  gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.2.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin
--enable-initfini-array --disable-libgcj --with-isl --enable-libmpx
--enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 5.2.1 20151104 (Red Hat 5.2.1-5) (GCC)

Vinson

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-04 18:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 10:18 [PATCH v2] Remove unused variable in fds/drm.c Vinson Lee
2015-12-04 18:07 ` Dave Jones
2015-12-04 18:49   ` Vinson Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).