Project

General

Profile

Enhancement #750 » 0024-sanitize-pragma-ignore-passing-argument-X-of-.-with-.patch

Loïc Gomez, 2022-01-10 20:48

View differences:

src/irc.c
const char *key)
{
struct chan_info *ci;
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (!ischannel(*chan))
return;
#pragma GCC diagnostic pop
ci = hash_get(&LINK(ircs)->chan_infos, chan);
if (!ci) {
......
return;
}
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (ischannel(*irc_line_elem(line, 1)) || LINK(src) != LINK(dest)) {
assert(!line->origin);
line->origin = LINK(src)->l_server->nick;
......
free(str);
return;
}
#pragma GCC diagnostic pop
/* LINK(src) == LINK(dest) */
size_t len = strlen(irc_line_elem(line, 2)) + 6;
......
long int ovmask = 0;
/* some ircds (e.g. unreal) may display several flags for the
same nick */
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
while ((index = bip_get_index(server->prefixes, *names))) {
ovmask |= 1 << index;
names++;
}
#pragma GCC diagnostic pop
eon = names;
while (*eon && *eon != ' ')
eon++;
......
else if (*mode == '+')
add = 1;
else {
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (add) {
mode_add_letter_uniq(server, *mode);
} else {
mode_remove_letter(server, *mode);
}
#pragma GCC diagnostic pop
}
}
}
......
return OK_COPY;
}
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (!ischannel(irc_line_elem(line, 1)[0]))
return ERR_PROTOCOL;
#pragma GCC diagnostic pop
/* channel mode change */
channel = hash_get(&server->channels, irc_line_elem(line, 1));
......
long int ovmask;
int index;
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (*mode == 'k') {
if (add) {
channel->key = bip_strdup(
......
ovmask &= ~(1 << index);
hash_insert(&channel->ovmasks, nick, (void *)ovmask);
}
#pragma GCC diagnostic pop
return OK_COPY;
}
src/log.c
void log_privmsg(log_t *logdata, const char *ircmask, const char *destination,
const char *message)
{
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (!ischannel(*destination)) {
char *nick = nick_from_ircmask(ircmask);
do_log_privmsg(logdata, nick, 0, ircmask, message);
......
} else {
do_log_privmsg(logdata, destination, 0, ircmask, message);
}
#pragma GCC diagnostic pop
}
void log_cli_privmsg(log_t *logdata, const char *ircmask,
......
{
if (!ircmask)
ircmask = P_IRCMASK;
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (!ischannel(*destination)) {
char *nick = nick_from_ircmask(ircmask);
do_log_privmsg(logdata, nick, 0, ircmask, message);
......
} else {
do_log_privmsg(logdata, destination, 0, ircmask, message);
}
#pragma GCC diagnostic pop
}
void log_cli_notice(log_t *logdata, const char *ircmask,
......
for (hash_it_init(&logdata->logfgs, &hi); hash_it_item(&hi);
hash_it_next(&hi)) {
store = hash_it_item(&hi);
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (ischannel(*hash_it_key(&hi)))
log_reset(store);
else
list_add_last(&drop, bip_strdup(hash_it_key(&hi)));
#pragma GCC diagnostic pop
}
char *name;
......
store = hash_get(&log->logfgs, storename);
if (store) {
log_reset(store);
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (!ischannel(*storename))
log_drop(log, storename);
#pragma GCC diagnostic pop
}
}
......
return _log_wrap(dest, buf);
p++;
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (out && !ischannel(*dest)) {
son = storename;
lon = strlen(storename);
}
#pragma GCC diagnostic pop
som = p;
lom = strlen(p);
......
strcpy(p, "ACTION ");
p += strlen("ACTION ");
}
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (out && !ischannel(*dest)) {
strcpy(p, PMSG_ARROW);
p += strlen(PMSG_ARROW);
}
#pragma GCC diagnostic pop
if (logdata->user->backlog_timestamp != BLTSNone) {
memcpy(p, sots, lots);
p += lots;
......
const char *dest;
ret = NULL;
// TODO resolve this issue from array_get
// passing argument X of .... with different width due to prototype
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
if (ischannel(*bl))
dest = bl;
else
dest = cli_nick;
#pragma GCC diagnostic pop
if (log_has_backlog(log, bl) || hours) {
if (hours == 0)
(24-24/24)