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)
|
const char *key)
|
||||||
{
|
{
|
||||||
struct chan_info *ci;
|
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))
|
if (!ischannel(*chan))
|
||||||
return;
|
return;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
ci = hash_get(&LINK(ircs)->chan_infos, chan);
|
ci = hash_get(&LINK(ircs)->chan_infos, chan);
|
||||||
if (!ci) {
|
if (!ci) {
|
||||||
@ -1291,6 +1296,10 @@ static void irc_copy_cli(struct link_client *src, struct link_client *dest,
|
|||||||
return;
|
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)) {
|
if (ischannel(*irc_line_elem(line, 1)) || LINK(src) != LINK(dest)) {
|
||||||
assert(!line->origin);
|
assert(!line->origin);
|
||||||
line->origin = LINK(src)->l_server->nick;
|
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);
|
free(str);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
/* LINK(src) == LINK(dest) */
|
/* LINK(src) == LINK(dest) */
|
||||||
size_t len = strlen(irc_line_elem(line, 2)) + 6;
|
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;
|
long int ovmask = 0;
|
||||||
/* some ircds (e.g. unreal) may display several flags for the
|
/* some ircds (e.g. unreal) may display several flags for the
|
||||||
same nick */
|
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))) {
|
while ((index = bip_get_index(server->prefixes, *names))) {
|
||||||
ovmask |= 1 << index;
|
ovmask |= 1 << index;
|
||||||
names++;
|
names++;
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
eon = names;
|
eon = names;
|
||||||
while (*eon && *eon != ' ')
|
while (*eon && *eon != ' ')
|
||||||
eon++;
|
eon++;
|
||||||
@ -1682,11 +1697,16 @@ static void irc_user_mode(struct link_server *server, struct line *line)
|
|||||||
else if (*mode == '+')
|
else if (*mode == '+')
|
||||||
add = 1;
|
add = 1;
|
||||||
else {
|
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) {
|
if (add) {
|
||||||
mode_add_letter_uniq(server, *mode);
|
mode_add_letter_uniq(server, *mode);
|
||||||
} else {
|
} else {
|
||||||
mode_remove_letter(server, *mode);
|
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;
|
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]))
|
if (!ischannel(irc_line_elem(line, 1)[0]))
|
||||||
return ERR_PROTOCOL;
|
return ERR_PROTOCOL;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
/* channel mode change */
|
/* channel mode change */
|
||||||
channel = hash_get(&server->channels, irc_line_elem(line, 1));
|
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;
|
long int ovmask;
|
||||||
int index;
|
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 (*mode == 'k') {
|
||||||
if (add) {
|
if (add) {
|
||||||
channel->key = bip_strdup(
|
channel->key = bip_strdup(
|
||||||
@ -1809,6 +1838,7 @@ static int irc_mode_channel(struct link_server *s, struct channel *channel,
|
|||||||
ovmask &= ~(1 << index);
|
ovmask &= ~(1 << index);
|
||||||
hash_insert(&channel->ovmasks, nick, (void *)ovmask);
|
hash_insert(&channel->ovmasks, nick, (void *)ovmask);
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
return OK_COPY;
|
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,
|
void log_privmsg(log_t *logdata, const char *ircmask, const char *destination,
|
||||||
const char *message)
|
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)) {
|
if (!ischannel(*destination)) {
|
||||||
char *nick = nick_from_ircmask(ircmask);
|
char *nick = nick_from_ircmask(ircmask);
|
||||||
do_log_privmsg(logdata, nick, 0, ircmask, message);
|
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 {
|
} else {
|
||||||
do_log_privmsg(logdata, destination, 0, ircmask, message);
|
do_log_privmsg(logdata, destination, 0, ircmask, message);
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
void log_cli_privmsg(log_t *logdata, const char *ircmask,
|
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)
|
if (!ircmask)
|
||||||
ircmask = P_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)) {
|
if (!ischannel(*destination)) {
|
||||||
char *nick = nick_from_ircmask(ircmask);
|
char *nick = nick_from_ircmask(ircmask);
|
||||||
do_log_privmsg(logdata, nick, 0, ircmask, message);
|
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 {
|
} else {
|
||||||
do_log_privmsg(logdata, destination, 0, ircmask, message);
|
do_log_privmsg(logdata, destination, 0, ircmask, message);
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
void log_cli_notice(log_t *logdata, const char *ircmask,
|
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);
|
for (hash_it_init(&logdata->logfgs, &hi); hash_it_item(&hi);
|
||||||
hash_it_next(&hi)) {
|
hash_it_next(&hi)) {
|
||||||
store = hash_it_item(&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)))
|
if (ischannel(*hash_it_key(&hi)))
|
||||||
log_reset(store);
|
log_reset(store);
|
||||||
else
|
else
|
||||||
list_add_last(&drop, bip_strdup(hash_it_key(&hi)));
|
list_add_last(&drop, bip_strdup(hash_it_key(&hi)));
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
char *name;
|
char *name;
|
||||||
@ -752,8 +767,13 @@ void log_reset_store(log_t *log, const char *storename)
|
|||||||
store = hash_get(&log->logfgs, storename);
|
store = hash_get(&log->logfgs, storename);
|
||||||
if (store) {
|
if (store) {
|
||||||
log_reset(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))
|
if (!ischannel(*storename))
|
||||||
log_drop(log, 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);
|
return _log_wrap(dest, buf);
|
||||||
p++;
|
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)) {
|
if (out && !ischannel(*dest)) {
|
||||||
son = storename;
|
son = storename;
|
||||||
lon = strlen(storename);
|
lon = strlen(storename);
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
som = p;
|
som = p;
|
||||||
lom = strlen(p);
|
lom = strlen(p);
|
||||||
@ -963,10 +988,15 @@ char *log_beautify(log_t *logdata, const char *buf, const char *storename,
|
|||||||
strcpy(p, "ACTION ");
|
strcpy(p, "ACTION ");
|
||||||
p += strlen("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)) {
|
if (out && !ischannel(*dest)) {
|
||||||
strcpy(p, PMSG_ARROW);
|
strcpy(p, PMSG_ARROW);
|
||||||
p += strlen(PMSG_ARROW);
|
p += strlen(PMSG_ARROW);
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
if (logdata->user->backlog_timestamp != BLTSNone) {
|
if (logdata->user->backlog_timestamp != BLTSNone) {
|
||||||
memcpy(p, sots, lots);
|
memcpy(p, sots, lots);
|
||||||
p += lots;
|
p += lots;
|
||||||
@ -1386,10 +1416,15 @@ list_t *backlog_lines(log_t *log, const char *bl, const char *cli_nick,
|
|||||||
const char *dest;
|
const char *dest;
|
||||||
|
|
||||||
ret = NULL;
|
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))
|
if (ischannel(*bl))
|
||||||
dest = bl;
|
dest = bl;
|
||||||
else
|
else
|
||||||
dest = cli_nick;
|
dest = cli_nick;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
if (log_has_backlog(log, bl) || hours) {
|
if (log_has_backlog(log, bl) || hours) {
|
||||||
if (hours == 0)
|
if (hours == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user