aboutsummaryrefslogtreecommitdiffstats
path: root/astman
diff options
context:
space:
mode:
author(no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-21 16:53:51 +0000
committer(no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-21 16:53:51 +0000
commit0721731e93eb315ab19418b95fad8690417b8994 (patch)
tree84965a610f6ae7e51cd499f8bd89464f247db803 /astman
parent27a9c96742202c8188b53a0173649de479256b69 (diff)
This commit was manufactured by cvs2svn to create tag 'v1-0-10'.
git-svn-id: http://svn.digium.com/svn/asterisk/tags/v1-0-10@7178 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'astman')
-rwxr-xr-xastman/astman.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/astman/astman.c b/astman/astman.c
index ebeeb67f1..c26c24be6 100755
--- a/astman/astman.c
+++ b/astman/astman.c
@@ -28,6 +28,14 @@
#define MAX_HEADERS 80
#define MAX_LEN 256
+/*
+ * 2005.05.27 - different versions of newt define the type of the buffer
+ * for the 5th argument to newtEntry() as char ** or const char ** . To
+ * let the code compile cleanly with -Werror, we cast it to void * through
+ * _NEWT_CAST.
+ */
+#define _NEWT_CAST (void *)
+
static struct ast_mansession {
struct sockaddr_in sin;
int fd;
@@ -436,7 +444,7 @@ static int get_user_input(char *msg, char *buf, int buflen)
newtCenteredWindow(60,7, msg);
- inpfield = newtEntry(5, 2, "", 50, &input, 0);
+ inpfield = newtEntry(5, 2, "", 50, _NEWT_CAST &input, 0);
ok = newtButton(22, 3, "OK");
cancel = newtButton(32, 3, "Cancel");
form = newtForm(NULL, NULL, 0);
@@ -603,8 +611,8 @@ static int login(char *hostname)
ulabel = newtLabel(4,2,"Username:");
plabel = newtLabel(4,3,"Password:");
- username = newtEntry(14, 2, "", 20, &user, 0);
- password = newtEntry(14, 3, "", 20, &pass, NEWT_FLAG_HIDDEN);
+ username = newtEntry(14, 2, "", 20, _NEWT_CAST &user, 0);
+ password = newtEntry(14, 3, "", 20, _NEWT_CAST &pass, NEWT_FLAG_HIDDEN);
form = newtForm(NULL, NULL, 0);
newtFormAddComponents(form, username, password, login, cancel, label, ulabel, plabel,NULL);