Skip to content

Commit

Permalink
fix discarded-qualifier compler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed May 9, 2024
1 parent 1bcfcb6 commit 5c3d510
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion indimail-x/atrn_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ die_nomem()
}

int
atrn_access(char *email, char *domain)
atrn_access(const char *email, const char *domain)
{
static stralloc SqlBuf = {0}, User = {0}, Domain = {0}, Email = {0};
int len, num;
Expand Down
2 changes: 1 addition & 1 deletion indimail-x/inquery.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ cleanup(int rfd, int wfd, void (*sig_pipe_save)(), char *fifo)
* (len of string: int|QueryType: 1|NULL: 1|EmailId: len1|NULL: 1|Fifo: len2|NULL: 1|IP: len3|NULL: 1)
*/
void *
inquery(char query_type, char *email, char *ip)
inquery(char query_type, const char *email, const char *ip)
{
int rfd, wfd, len, bytes, idx, readTimeout, writeTimeout,
pipe_size, fd;
Expand Down
2 changes: 1 addition & 1 deletion indimail-x/inquery.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
#ifndef INQUERY_H
#define INQUERY_H

void *inquery(char, char *, char *);
void *inquery(char, const char *, const char *);

#endif
4 changes: 2 additions & 2 deletions indimail-x/parse_email.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ static char sccsid[] = "$Id: parse_email.c,v 1.3 2021-07-27 18:06:44+05:30 C
* -1 if either user or domain was truncated due to buff_size being reached
*/
int
parse_email(char *email, stralloc *user, stralloc *domain)
parse_email(const char *email, stralloc *user, stralloc *domain)
{
char *ptr;
const char *ptr;
int i, len;

for (len = 0, ptr = email; *ptr; ptr++, len++) {
Expand Down
2 changes: 1 addition & 1 deletion indimail-x/parse_email.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
#include <stralloc.h>
#endif

int parse_email(char *, stralloc *, stralloc *);
int parse_email(const char *, stralloc *, stralloc *);

#endif
8 changes: 4 additions & 4 deletions indimail-x/qmailmrtg.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ process_file(char *file_name, char type, char inquery_type)
* -3 - name too long
*/
int
run_init(char *service_dir)
run_init(const char *service_dir)
{
char *run_dir, *p, *s;
char buf[256], dirbuf[256];
Expand Down Expand Up @@ -529,7 +529,7 @@ run_init(char *service_dir)
}

void
print_status(char *dir, char status[])
print_status(const char *dir, char status[])
{
unsigned long pid;
unsigned char want, paused;
Expand Down Expand Up @@ -611,9 +611,9 @@ print_status(char *dir, char status[])
}

void
print_uptime(char *sdir, char status[], int len)
print_uptime(const char *sdir, char status[], int len)
{
char *x;
const char *x;
int fd, r;

if (!sdir) {
Expand Down
4 changes: 2 additions & 2 deletions indimail-x/vchkpass.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,14 @@ main(int argc, char **argv)
}
module_pid[fmt_ulong(module_pid, getpid())] = 0;
if ((ptr = env_get("DEBUG_LOGIN")) && *ptr > '0') {
ptr = get_authmethod(auth_method);
ptr = (char *) get_authmethod(auth_method);
strerr_warn16("vchkpass: ", "pid [", module_pid, "]: login [", login,
"] challenge [", challenge, "] response [", response,
"] password [", pass ? pass : "cram-disabled", "] crypted [",
crypt_pass, "] authmethod [", ptr, "]", 0);
} else
if (env_get("DEBUG")) {
ptr = get_authmethod(auth_method);
ptr = (char *) get_authmethod(auth_method);
strerr_warn8("vchkpass: ", "pid [", module_pid, "]: login [", login,
"] authmethod [", ptr, "]", 0);
}
Expand Down

0 comments on commit 5c3d510

Please sign in to comment.