View Issue Details

IDProjectCategoryView StatusLast Update
0003929unrealinstallingpublic2010-08-03 18:33
Reporterwarg Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version3.2.9-RC1 
Summary0003929: patch for ssl.c:437: warning: assignment discards qualifiers from pointer target type
Description[warg@beorn Unreal-stable]$ time make -j24 1>/dev/null
ssl.c: In function ‘ssl_get_cipher’:
ssl.c:437: warning: assignment discards qualifiers from pointer target type

patch attached

change
        SSL_CIPHER *c;
to
        const SSL_CIPHER *c;
TagsNo tags attached.
Attached Files
3rd party modules

Relationships

duplicate of 0003939 resolvedohnobinki patch to fix for various compiler warnings 

Activities

syzop

2010-07-15 13:20

administrator   ~0016197

Not that important, but I wonder: How come I don't get this warning? :P

http://www.openssl.org/docs/ssl/SSL_get_current_cipher.html also doesn't say anything about const...

What's your openssl version?

warg

2010-07-20 04:08

reporter   ~0016221

Has nothing to do with SSL version, Syzop, this is type-matching walking-on-eggshells.

You'll get this warning on GCC 4.4.4, which I should've said when reporting this.

The protection of the pointer's target provided by the const qualifier is lost when the const is thrown out by assigning it to a plain char* pointer.

-> SSL_CIPHER *c; // change to: const SSL_CIPHER *c; to fix this warning

        buf[0] = '\0';
        strcpy(buf, SSL_get_version(ssl));
        strcat(buf, "-");
        strcat(buf, SSL_get_cipher(ssl));
-> c = SSL_get_current_cipher(ssl);

ohnobinki

2010-07-20 04:13

reporter   ~0016222

> How come I don't get this warning? :P

There must be some flag or GCC configuration differences as I also don't get this warning.

May I commit this regardless as the current code is wrong?

warg

2010-07-20 04:44

reporter   ~0016223

see 0003939 before any commit

ohnobinki

2010-08-03 18:33

reporter   ~0016252

patch in 0003939 will fix this.

Issue History

Date Modified Username Field Change
2010-07-14 22:02 warg New Issue
2010-07-14 22:02 warg File Added: ssl.c-437-warning.patch
2010-07-15 13:20 syzop Note Added: 0016197
2010-07-20 04:08 warg Note Added: 0016221
2010-07-20 04:13 ohnobinki Note Added: 0016222
2010-07-20 04:44 warg Note Added: 0016223
2010-08-03 18:33 ohnobinki Relationship added duplicate of 0003939
2010-08-03 18:33 ohnobinki QA => Not touched yet by developer
2010-08-03 18:33 ohnobinki U4: Need for upstream patch => No need for upstream InspIRCd patch
2010-08-03 18:33 ohnobinki Note Added: 0016252
2010-08-03 18:33 ohnobinki Status new => closed
2010-08-03 18:33 ohnobinki Resolution open => duplicate