gcc 4.6 complains about these with -Wall.
+2011-01-23 Michael Poole <mdpoole@troilus.org>
+
+ * ircd/ircd_res.c (proc_answer): Delete unread variable
+ query_class.
+
+ * ircd/m_nick.c (m_nick): Delete unread variable client_name.
+
+ * ircd/m_ping.c (m_ping): Delete unread variable origin.
+
+ * ircd/m_whois.c (do_whois): Delete unread variable name.
+
+ * ircd/parse.c (parse_client): Delete unread variable noprefix.
+
+ * ircd/s_conf.c (killcomment): Delete unread variable tm.
+
+ * ircd/s_stats.c (stats_configured_links): Delete unread variable
+ pass.
+
2011-01-23 Michael Poole <mdpoole@troilus.org>
* ircd/gline.c (gline_modify): Notify opers using SNO_AUTO rather
2011-01-23 Michael Poole <mdpoole@troilus.org>
* ircd/gline.c (gline_modify): Notify opers using SNO_AUTO rather
{
char hostbuf[HOSTLEN + 100]; /* working buffer */
unsigned char *current; /* current position in buf */
{
char hostbuf[HOSTLEN + 100]; /* working buffer */
unsigned char *current; /* current position in buf */
- int query_class; /* answer class */
int type; /* answer type */
int n; /* temp count */
int rd_length;
int type; /* answer type */
int n; /* temp count */
int rd_length;
type = irc_ns_get16(current);
current += TYPE_SIZE;
type = irc_ns_get16(current);
current += TYPE_SIZE;
- query_class = irc_ns_get16(current);
+ /* We do not use the class or TTL values. */
current += TTL_SIZE;
rd_length = irc_ns_get16(current);
current += TTL_SIZE;
rd_length = irc_ns_get16(current);
char nick[NICKLEN + 2];
char* arg;
char* s;
char nick[NICKLEN + 2];
char* arg;
char* s;
- const char* client_name;
assert(0 != cptr);
assert(cptr == sptr);
assert(0 != cptr);
assert(cptr == sptr);
if (IsServerPort(cptr))
return exit_client(cptr, cptr, &me, "Use a different port");
if (IsServerPort(cptr))
return exit_client(cptr, cptr, &me, "Use a different port");
- /*
- * parv[0] will be empty for clients connecting for the first time
- */
- client_name = (*(cli_name(sptr))) ? cli_name(sptr) : "*";
-
if (parc < 2) {
send_reply(sptr, ERR_NONICKNAMEGIVEN);
return 0;
if (parc < 2) {
send_reply(sptr, ERR_NONICKNAMEGIVEN);
return 0;
int mo_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
struct Client* acptr;
int mo_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
struct Client* acptr;
- char *destination, *origin;
assert(0 != cptr);
assert(cptr == sptr);
if (parc < 2 || EmptyString(parv[1]))
return send_reply(sptr, ERR_NOORIGIN);
assert(0 != cptr);
assert(cptr == sptr);
if (parc < 2 || EmptyString(parv[1]))
return send_reply(sptr, ERR_NOORIGIN);
destination = parv[2]; /* Will get NULL or pointer (parc >= 2!!) */
if (!EmptyString(destination) && 0 != ircd_strcmp(destination, cli_name(&me))) {
destination = parv[2]; /* Will get NULL or pointer (parc >= 2!!) */
if (!EmptyString(destination) && 0 != ircd_strcmp(destination, cli_name(&me))) {
{
struct Client *acptr; /* Current client we're considering */
struct User *user; /* the user portion of the client */
{
struct Client *acptr; /* Current client we're considering */
struct User *user; /* the user portion of the client */
- const char *name; /* the name of this client */
struct Membership* chan;
int invis; /* does +i apply? */
int member; /* Is this user on any channels? */
struct Membership* chan;
int invis; /* does +i apply? */
int member; /* Is this user on any channels? */
* the target user(s) are on;
*/
user = cli_user(acptr);
* the target user(s) are on;
*/
user = cli_user(acptr);
- name = (!*(cli_name(acptr))) ? "?" : cli_name(acptr);
assert(user);
invis = (acptr != sptr) && IsInvisible(acptr);
assert(user);
invis = (acptr != sptr) && IsInvisible(acptr);
char* s;
int i;
int paramcount;
char* s;
int i;
int paramcount;
struct Message* mptr;
MessageHandler handler = 0;
struct Message* mptr;
MessageHandler handler = 0;
while (*ch == ' ')
ch++; /* Advance to command */
}
while (*ch == ' ')
ch++; /* Advance to command */
}
if (*ch == '\0')
{
ServerStats->is_empt++;
if (*ch == '\0')
{
ServerStats->is_empt++;
FBFILE* file = 0;
char line[80];
struct stat sb;
FBFILE* file = 0;
char line[80];
struct stat sb;
if (NULL == (file = fbopen(filename, "r"))) {
send_reply(sptr, ERR_NOMOTD);
if (NULL == (file = fbopen(filename, "r"))) {
send_reply(sptr, ERR_NOMOTD);
return;
}
fbstat(&sb, file);
return;
}
fbstat(&sb, file);
- tm = localtime((time_t*) &sb.st_mtime); /* NetBSD needs cast */
while (fbgets(line, sizeof(line) - 1, file)) {
char* end = line + strlen(line);
while (end > line) {
while (fbgets(line, sizeof(line) - 1, file)) {
char* end = line + strlen(line);
while (end > line) {
struct ConfItem *tmp;
unsigned short int port;
int maximum;
struct ConfItem *tmp;
unsigned short int port;
int maximum;
- char *host, *pass, *name, *username, *hub_limit;
+ char *host, *name, *username, *hub_limit;
for (tmp = GlobalConfList; tmp; tmp = tmp->next)
{
if ((tmp->status & sd->sd_funcdata))
{
host = BadPtr(tmp->host) ? null : tmp->host;
for (tmp = GlobalConfList; tmp; tmp = tmp->next)
{
if ((tmp->status & sd->sd_funcdata))
{
host = BadPtr(tmp->host) ? null : tmp->host;
- pass = BadPtr(tmp->passwd) ? null : tmp->passwd;
name = BadPtr(tmp->name) ? null : tmp->name;
username = BadPtr(tmp->username) ? null : tmp->username;
hub_limit = BadPtr(tmp->hub_limit) ? null : tmp->hub_limit;
name = BadPtr(tmp->name) ? null : tmp->name;
username = BadPtr(tmp->username) ? null : tmp->username;
hub_limit = BadPtr(tmp->hub_limit) ? null : tmp->hub_limit;