Enhancement #750 » 0021-sanitize-pragmas-for-our-code.patch
src/bip.c | ||
---|---|---|
81 | 81 |
md5 = bip_malloc((size_t) 20); |
82 | 82 |
for (i = 0; i < 20; i++) { |
83 | 83 |
sscanf(hex + 2 * i, "%02x", &buf); |
84 |
// conversion from ‘unsigned int’ to ‘unsigned char’ may change value |
|
85 |
// we're parsing a text (hex) so buf won't ever be something else than a char |
|
86 |
#pragma GCC diagnostic push |
|
87 |
#pragma GCC diagnostic ignored "-Wconversion" |
|
84 | 88 |
md5[i] = buf; |
89 |
#pragma GCC diagnostic pop |
|
85 | 90 |
} |
86 | 91 | |
87 | 92 |
*seed = 0; |
src/irc.c | ||
---|---|---|
23 | 23 |
#include "md5.h" |
24 | 24 |
#include "utils/base64.h" |
25 | 25 | |
26 |
// TODO resolve assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 |
|
27 |
#pragma GCC diagnostic ignored "-Wstrict-overflow" |
|
28 | ||
26 | 29 |
#define S_CONN_DELAY (10) |
27 | 30 | |
28 | 31 |
extern int sighup; |
src/line.c | ||
---|---|---|
15 | 15 |
#include "line.h" |
16 | 16 |
#include "util.h" |
17 | 17 | |
18 |
// TODO resolve assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 |
|
19 |
#pragma GCC diagnostic ignored "-Wstrict-overflow" |
|
20 | ||
18 | 21 |
void irc_line_init(struct line *l) |
19 | 22 |
{ |
20 | 23 |
memset(l, 0, sizeof(struct line)); |
src/md5.c | ||
---|---|---|
359 | 359 |
length = strlen(str); |
360 | 360 |
length += 4; |
361 | 361 |
ptr = bip_malloc(length); |
362 |
// conversion from ‘unsigned int’ to ‘unsigned char’ may change value [-Werror=conversion] |
|
363 |
#pragma GCC diagnostic push |
|
364 |
#pragma GCC diagnostic ignored "-Wconversion" |
|
362 | 365 |
ptr[0] = seed >> 24 & 0xff; |
366 |
#pragma GCC diagnostic pop |
|
363 | 367 |
ptr[1] = seed >> 16 & 0xff; |
364 | 368 |
ptr[2] = seed >> 8 & 0xff; |
365 | 369 |
ptr[3] = seed & 0xff; |
src/util.h | ||
---|---|---|
42 | 42 |
void *ptr; |
43 | 43 |
}; |
44 | 44 | |
45 |
#pragma GCC diagnostic push |
|
46 |
#pragma GCC diagnostic ignored "-Wstrict-prototypes" |
|
45 | 47 |
typedef struct list { |
46 | 48 |
struct list_item *first; |
47 | 49 |
struct list_item *last; |
48 | 50 |
int (*cmp)(); |
49 | 51 |
} list_t; |
52 |
#pragma GCC diagnostic pop |
|
50 | 53 | |
51 | 54 |
typedef struct list_iterator { |
52 | 55 |
list_t *list; |
53 |
- |