The "certificate_db/ssl_crtd fixes" patch I posted should fix these errors.
But we may have still problems in other cases too. I did not find any
way to check using gcc.
Also assume that we are storing the value from a function:
ret = afunc();
If we did not use the "ret" value, will result to a "value set but not
used" error or something like that.
Is there any flag in clang++ compiler eg a "-Wno-unused-value" which
ignores this warning?
On 10/10/2012 02:09 PM, Amos Jeffries wrote:
> Hi Alex, Christos can one of you look at this error in ssl_crtd please?
>
> On 10/10/2012 7:29 p.m., noc wrote:
>> See
>> <http://build.squid-cache.org/job/3.HEAD-amd64-FreeBSD-9.0-clang/28/changes>
>>
>>
>> Changes:
>>
>> [Amos Jeffries] ssl_crtd: set new certificate serial number to zero
>>
>> Initialize new BN value to zero instead of simply testing and ignoring
>> the result.
>>
>> Detected by Jenkins running clang on FreeBSD 9.
>
>> clang++ -DHAVE_CONFIG_H -I../../.. -I../../../include -I../../../lib
>> -I../../../src -I../../include -I/usr/local/include -I/usr/include
>> -I/usr/include -I../../../libltdl -I/usr/local/include/libxml2
>> -I/usr/include -I/usr/include -I/usr/local/include/libxml2 -Wall
>> -Wpointer-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT
>> -D_FILE_OFFSET_BITS=64 -g -O2 -I/usr/local/include -MT
>> certificate_db.o -MD -MP -MF .deps/certificate_db.Tpo -c -o
>> certificate_db.o ../../../src/ssl/certificate_db.cc
>> ../../../src/ssl/certificate_db.cc:435:13: error: expression result
>> unused [-Werror,-Wunused-value]
>> lh_OPENSSL_STRING_delete(fieldIndex, (char **)row);
>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> /usr/local/include/openssl/safestack.h:2541:43: note: expanded from:
>> #define lh_OPENSSL_STRING_delete(lh,inst)
>> LHM_lh_delete(OPENSSL_STRING,lh,inst)
>> ^
>> /usr/local/include/openssl/lhash.h:218:4: note: expanded from:
>> ((type *)lh_delete(CHECKED_LHASH_OF(type,
>> lh), \
>> ^
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ../../../src/ssl/certificate_db.cc:426:5: error: expression result
>> unused [-Werror,-Wunused-value]
>> sk_OPENSSL_PSTRING_delete(db.get()->data, rowIndex);
>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> /usr/local/include/openssl/safestack.h:2072:42: note: expanded from:
>> #define sk_OPENSSL_PSTRING_delete(st, i)
>> SKM_sk_delete(OPENSSL_PSTRING, (st), (i))
>> ^
>> /usr/local/include/openssl/safestack.h:160:2: note: expanded from:
>> (type *)sk_delete(CHECKED_STACK_OF(type, st), i)
>> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 2 errors generated.
>> *** Error code 1
>
> Amos
>
Received on Wed Nov 07 2012 - 17:36:27 MST
This archive was generated by hypermail 2.2.0 : Thu Nov 08 2012 - 12:00:05 MST