title: JNI XOR Encryption Eclipse build error
body: <p>I want to XOR operator for byte or char array using JNI. I make native method using byte or char array and key which I have to use for encryption or decryption. For single line of XOR I amn't able to build C file in eclipse becasue of "void value not ignored as it ought to be". 
  I added <code>jchar *xor</code> for solve void error than I get one more error "invalid use of void expression"
  I amn't able to solve this. here is my code for c.</p>
  
  <pre><code>int
  Java_packagename_classname_encryption(JNIEnv* env, jobject obj,
           jcharArray buffer,  jint offset,
           jint length,  jcharArray _key,  jint keylength){
  
  
          jint temp,i ;
          jint _keyByteIndex = 0;
          jcharArray xor[length]  ;
  
  
          for(i=0; i&lt;length + offset; ++i){
  
              /*char temp = buffer[i];
              temp ^= _key[_keyByteIndex];
              buffer[i] = (char) temp;*/
  
              buffer[i] = (jchar) (buffer[i] ^ _key[_keyByteIndex]);
  
              if (_keyByteIndex + 1 &gt;=keylength){
                  _keyByteIndex = 0;
              }else{
                  ++_keyByteIndex;
              }
  
          }
  
          return 0;
  }
  </code></pre>