Package: ngorca
Version: 1.0.2-2
Followup-For: Bug #746886
Tags: patch
X-Debbugs-Cc: bren...@br.ibm.com
User: debian-powe...@lists.debian.org
Usertags: ppc64el

Dear Maintainer,

In this package, the error is seen in ngorca/src/ngorca.c file :

ngorca.c:173:12: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
    for (j=0, i; j<passLen; j++, i+=2) {
            ^
I believe the compiler expects all the indices to be initialized before starting the loop. And since you need the i to continue from the previous loop's last value, I am just
initializing this to i=i.

Attached is a patch to do this and allows the package to build
correctly. Please let me know if this is not a correct solution.

Thanks for considering the patch!

Thanks and regards,
Brahadambal Srinivasan


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ppc64el (ppc64le)

Kernel: Linux 3.16-trunk-powerpc64le (SMP w/32 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
only in patch2:
unchanged:
--- ngorca-1.0.2.orig/ngorca/src/ngorca.c
+++ ngorca-1.0.2/ngorca/src/ngorca.c
@@ -170,7 +170,7 @@
    for (j=0, i=1; j<hash->unameLen; j++, i+=2) {
       plaintextstring[i] = hash->username[j];
    }
-   for (j=0, i; j<passLen; j++, i+=2) {
+   for (j=0, i=i ; j<passLen; j++, i+=2) {
       plaintextstring[i] = password[j];
    }
 

Reply via email to