Commit graph

3999 commits

Author SHA1 Message Date
Aaron Jones
75ee370d5f
authd/authd: a function that calls exit(3) should be marked noreturn 2016-06-01 20:54:13 +00:00
Aaron Jones
1863a0f818
wsockd: various fixes
* Use correct sign for comparing data lengths
* Don't return a void statement in a void function
* Remove unused functions and macros
2016-06-01 20:54:12 +00:00
Aaron Jones
759835cf46
ssld: remove unused macros, avoid sign overflow in integer function argument 2016-06-01 20:54:12 +00:00
Aaron Jones
ab9088ad2e
wsproc: compile out dead code
Investigation is required to determine if this function should
actually be used
2016-06-01 20:54:12 +00:00
Aaron Jones
aa7b99eb77
restart: functions that call exit(3) should be marked noreturn 2016-06-01 20:54:12 +00:00
Aaron Jones
0b91afb2e1
ircd_signal: a function that tailcalls a noreturn function should be marked noreturn 2016-06-01 20:54:12 +00:00
Aaron Jones
df3db5d99b
ircd: functions that call exit(3) should be marked noreturn 2016-06-01 20:54:12 +00:00
Aaron Jones
341560ecf2
getopt: a function that calls exit(3) should be marked noreturn 2016-06-01 20:54:12 +00:00
Aaron Jones
b1cfd3922c
dns: make function used only within this unit static 2016-06-01 20:54:12 +00:00
Aaron Jones
4decc628bd
class: remove unused macros 2016-06-01 20:54:12 +00:00
Aaron Jones
ce2c092b49
chmode: remove unreachable break statement 2016-06-01 20:54:12 +00:00
Aaron Jones
bca336720e
chmode: silence harmless uninitialised variable warning 2016-06-01 20:54:12 +00:00
Aaron Jones
ec5522a1ca
channel: silence harmless uninitialised variable warning 2016-06-01 20:54:12 +00:00
Aaron Jones
2ec9f59588
bandbi: a function that calls exit(3) should be marked noreturn 2016-06-01 20:54:11 +00:00
Aaron Jones
5cbd46a893
authproc: don't shadow variable decls, avoid reserved name 2016-06-01 20:54:11 +00:00
Aaron Jones
47a66e154f
librb: silence some fairly harmless compiler warnings
These include warnings about "break" statements that will never be
executed (because they are after "return" statements), unused macros
(lost to code refactoring or never even used in the first place),
functions that call abort() or loop indefinitely but aren't marked with
the "noreturn" attribute, and use of variables possibly uninitialised
(a false positive).
2016-06-01 20:54:11 +00:00
Aaron Jones
4abb0b02c1
Preliminary code tidying complete.
These issues (commits 92706fd5 through 707bc7cd inclusive) were
identified with the Clang compiler. Please raise concerns about
them on the issue tracker or in the support channel.
2016-06-01 20:46:43 +00:00
Aaron Jones
707bc7cd5a
tools/mkfingerprint: strlen(3) on a raw byte array is wrong -- use its length as indicated by the function that filled it 2016-06-01 20:41:03 +00:00
Aaron Jones
2cad541582
tools/mkpasswd: functions that call exit(3) should be marked noreturn 2016-06-01 20:38:54 +00:00
Aaron Jones
e44fe481e3
bandb/bandb: functions that call exit(3) should be marked noreturn, avoid sign overflow in integer function argument 2016-06-01 20:37:51 +00:00
Aaron Jones
2e032bf638
bandb/bantool: a function that calls exit(3) should be marked noreturn 2016-06-01 20:34:51 +00:00
Aaron Jones
856440bcb3
authd/res: make function used only within this unit static, remove unused macros 2016-06-01 20:32:12 +00:00
Aaron Jones
656c85d090
authd/provider: remove shadowed double variable decl 2016-06-01 20:29:35 +00:00
Aaron Jones
2a7e1da947
authd/authd: a function that calls exit(3) should be marked noreturn 2016-06-01 20:27:19 +00:00
Aaron Jones
2f361bfc49
wsockd: various fixes
* Use correct sign for comparing data lengths
* Don't return a void statement in a void function
* Remove unused functions and macros
2016-06-01 20:23:13 +00:00
Aaron Jones
1187d61128
ssld: remove unused macros, avoid sign overflow in integer function argument 2016-06-01 20:17:09 +00:00
Aaron Jones
9a9bc518c1
wsproc: compile out dead code
Investigation is required to determine if this function should
actually be used
2016-06-01 20:15:07 +00:00
Aaron Jones
87a0418643
restart: functions that call exit(3) should be marked noreturn 2016-06-01 20:14:09 +00:00
Aaron Jones
e83991950f
ircd_signal: a function that tailcalls a noreturn function should be marked noreturn 2016-06-01 20:11:46 +00:00
Aaron Jones
6be270b107
ircd: functions that call exit(3) should be marked noreturn 2016-06-01 20:05:56 +00:00
Aaron Jones
47493ba39c
getopt: a function that calls exit(3) should be marked noreturn 2016-06-01 20:03:52 +00:00
Aaron Jones
83adc41d5c
dns: make function used only within this unit static 2016-06-01 20:02:57 +00:00
Aaron Jones
002cc1d04d
class: remove unused macros 2016-06-01 20:01:51 +00:00
Aaron Jones
b2c9df4786
chmode: remove unreachable break statement 2016-06-01 20:00:48 +00:00
Aaron Jones
73d759aeb4
chmode: silence harmless uninitialised variable warning 2016-06-01 20:00:11 +00:00
Aaron Jones
d352ca15aa
channel: silence harmless uninitialised variable warning 2016-06-01 19:58:53 +00:00
Aaron Jones
2ce25d94d9
bandbi: a function that calls exit(3) should be marked noreturn 2016-06-01 19:56:47 +00:00
Aaron Jones
e806f52379
authproc: don't shadow variable decls, avoid reserved name 2016-06-01 19:55:35 +00:00
Aaron Jones
92706fd551
librb: silence some fairly harmless compiler warnings
These include warnings about "break" statements that will never be
executed (because they are after "return" statements), unused macros
(lost to code refactoring or never even used in the first place),
functions that call abort() or loop indefinitely but aren't marked with
the "noreturn" attribute, and use of variables possibly uninitialised
(a false positive).
2016-06-01 19:50:09 +00:00
Aaron Jones
d5ad6015c5
openssl: use snprintf(3) instead of rb_snprintf() 2016-06-01 18:04:43 +00:00
Aaron Jones
1a938496eb
openssl: use snprintf(3) instead of rb_snprintf() 2016-06-01 18:04:23 +00:00
Aaron Jones
1490b52e19
openssl: More LibreSSL compatibility
LibreSSL does not have the new version macros & functions that OpenSSL
1.1.0 implements. This causes a compile-time failure against LibreSSL.

Further, the runtime function for returning the library version returns
the wrong number (the hardcoded constant number SSLEAY_VERSION_NUMBER
aka OPENSSL_VERSION_NUMBER, instead of LIBRESSL_VERSION_NUMBER).

Add more ifdef soup to remedy the situation.
2016-06-01 17:55:53 +00:00
Aaron Jones
5325f9d2d2
openssl: More LibreSSL compatibility
LibreSSL does not have the new version macros & functions that OpenSSL
1.1.0 implements. This causes a compile-time failure against LibreSSL.

Further, the runtime function for returning the library version returns
the wrong number (the hardcoded constant number SSLEAY_VERSION_NUMBER
aka OPENSSL_VERSION_NUMBER, instead of LIBRESSL_VERSION_NUMBER).

Add more ifdef soup to remedy the situation.
2016-06-01 17:54:43 +00:00
Aaron Jones
0763237d5f
openssl: change how we load DH parameters
The code already assumes the presence of fopen(3) and errno, and, by
extension, fclose(3) and strerror(3), so just use those instead of the
BIO wrappers.

Additionally, don't fail to initialise if the DH file does exist but
parsing it fails, as per the pre-existing comment about them being
optional.
2016-05-25 21:48:50 +00:00
Aaron Jones
3057f91d98
openssl: change how we load DH parameters
The code already assumes the presence of fopen(3) and errno, and, by
extension, fclose(3) and strerror(3), so just use those instead of the
BIO wrappers.

Additionally, don't fail to initialise if the DH file does exist but
parsing it fails, as per the pre-existing comment about them being
optional.
2016-05-25 21:46:34 +00:00
Aaron Jones
0982871a99
strcpy: mass-migrate to strlcpy where appropriate 2016-05-15 03:58:44 +00:00
Aaron Jones
4d5a902f08
strcpy: mass-migrate to strlcpy where appropriate 2016-05-15 03:57:16 +00:00
Aaron Jones
8f961edc50
appveyor: correct version
[ci skip]
2016-05-15 01:14:08 +00:00
Aaron Jones
02ca4405a0
appveyor: correct version
[ci skip]
2016-05-15 01:13:50 +00:00
Aaron Jones
72640a9ddf
ircd_lexer: fix another crash with the same cause 2016-05-15 00:58:19 +00:00