ignore some issues related to array_get
ignore "passing argument X of .... with different width due to prototype"
This commit is contained in:
parent
26d347dec6
commit
e04f97c78f
30
src/irc.c
30
src/irc.c
@ -1105,8 +1105,13 @@ void irc_add_channel_info(struct link_server *ircs, const char *chan,
|
||||
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) {
|
||||
@ -1291,6 +1296,10 @@ static void irc_copy_cli(struct link_client *src, struct link_client *dest,
|
||||
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;
|
||||
@ -1300,6 +1309,7 @@ static void irc_copy_cli(struct link_client *src, struct link_client *dest,
|
||||
free(str);
|
||||
return;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/* LINK(src) == LINK(dest) */
|
||||
size_t len = strlen(irc_line_elem(line, 2)) + 6;
|
||||
@ -1509,10 +1519,15 @@ static int irc_353(struct link_server *server, struct line *line)
|
||||
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++;
|
||||
@ -1682,11 +1697,16 @@ static void irc_user_mode(struct link_server *server, struct line *line)
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1716,8 +1736,13 @@ static int irc_mode(struct link_server *server, struct line *line)
|
||||
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));
|
||||
@ -1786,6 +1811,10 @@ static int irc_mode_channel(struct link_server *s, struct channel *channel,
|
||||
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(
|
||||
@ -1809,6 +1838,7 @@ static int irc_mode_channel(struct link_server *s, struct channel *channel,
|
||||
ovmask &= ~(1 << index);
|
||||
hash_insert(&channel->ovmasks, nick, (void *)ovmask);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
return OK_COPY;
|
||||
}
|
||||
|
||||
|
35
src/log.c
35
src/log.c
@ -555,6 +555,10 @@ static void do_log_privmsg(log_t *logdata, const char *storage, int src,
|
||||
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);
|
||||
@ -562,6 +566,7 @@ void log_privmsg(log_t *logdata, const char *ircmask, const char *destination,
|
||||
} else {
|
||||
do_log_privmsg(logdata, destination, 0, ircmask, message);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
void log_cli_privmsg(log_t *logdata, const char *ircmask,
|
||||
@ -575,6 +580,10 @@ void log_notice(log_t *logdata, const char *ircmask, const char *destination,
|
||||
{
|
||||
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);
|
||||
@ -582,6 +591,7 @@ void log_notice(log_t *logdata, const char *ircmask, const char *destination,
|
||||
} else {
|
||||
do_log_privmsg(logdata, destination, 0, ircmask, message);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
void log_cli_notice(log_t *logdata, const char *ircmask,
|
||||
@ -732,10 +742,15 @@ void log_reset_all(log_t *logdata)
|
||||
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;
|
||||
@ -752,8 +767,13 @@ void log_reset_store(log_t *log, const char *storename)
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@ -926,10 +946,15 @@ char *log_beautify(log_t *logdata, const char *buf, const char *storename,
|
||||
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);
|
||||
@ -963,10 +988,15 @@ char *log_beautify(log_t *logdata, const char *buf, const char *storename,
|
||||
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;
|
||||
@ -1386,10 +1416,15 @@ list_t *backlog_lines(log_t *log, const char *bl, const char *cli_nick,
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user