summaryrefslogtreecommitdiffstats
path: root/genrc.c
diff options
context:
space:
mode:
authorAndreas Eversberg2010-03-11 14:07:20 +0100
committerAndreas Eversberg2010-03-11 14:07:20 +0100
commit0c65074b5b88b2da2390078d0fab6c72f228709d (patch)
tree297bc8a552f3dde8cdc96f8a2a40f6c8916444ed /genrc.c
parentregister_fd() bugfix. (diff)
downloadlcr-0c65074b5b88b2da2390078d0fab6c72f228709d.tar.gz
lcr-0c65074b5b88b2da2390078d0fab6c72f228709d.tar.xz
lcr-0c65074b5b88b2da2390078d0fab6c72f228709d.zip
Fixed compiler warnings when compiling with gcc 4.3.4.
Fixed names of moved include files (OpenBSC). modified: Makefile.am modified: Makefile.in modified: README modified: chan_lcr.c modified: configure modified: configure.ac modified: genrc.c modified: gentones.c modified: genwave.c modified: gsm.cpp modified: mISDN.cpp modified: main.c modified: port.cpp modified: tones.c modified: trace.c
Diffstat (limited to 'genrc.c')
-rw-r--r--genrc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/genrc.c b/genrc.c
index 3e349f4..1d5a076 100644
--- a/genrc.c
+++ b/genrc.c
@@ -39,6 +39,7 @@ int main(void)
FILE *fp;
int i = 0, j, jj, n;
char input[256], file[256];
+ int ret;
printf("\n\nThis program generates a script, which is used to start/stop/restart mISDN\n");
printf("driver. Please select card only once. Mode and options are given by LCR.\n");
@@ -52,7 +53,7 @@ int main(void)
}
do {
printf("\nSelect driver number[1-n] (or enter 'done'): "); fflush(stdout);
- scanf("%s", input);
+ ret = scanf("%s", input);
} while (atoi(input) <= 0 && !!strcmp(input, "done"));
type[i] = atoi(input);
i++;
@@ -66,22 +67,22 @@ int main(void)
}
printf("\nEnter LAW audio mode. For a-LAW (default), just enter 0. For u-LAW enter 1.\n[0..n | 0xn]: "); fflush(stdout);
- scanf("%s", input);
+ ret = scanf("%s", input);
lawopt = strtoul(input, NULL, 0);
printf("\nEnter debugging flags of mISDN core. For no debug, just enter 0.\n[0..n | 0xn]: "); fflush(stdout);
- scanf("%s", input);
+ ret = scanf("%s", input);
coredebug = strtoul(input, NULL, 0);
printf("\nEnter debugging flags of cards. For no debug, just enter 0.\n[0..n | 0xn]: "); fflush(stdout);
- scanf("%s", input);
+ ret = scanf("%s", input);
carddebug = strtoul(input, NULL, 0);
printf("\nEnter dsp debugging flags of driver. For no debug, just enter 0.\n[0..n | 0xn]: "); fflush(stdout);
- scanf("%s", input);
+ ret = scanf("%s", input);
dspdebug = strtoul(input, NULL, 0);
n = i;
printf("\nWhere do you like to load the modules from, enter 0 for default, 1 for\n'/usr/local/lcr/modules/' or the full path.\n[0 | 1 | <path>]: "); fflush(stdout);
- scanf("%s", input);
+ ret = scanf("%s", input);
if (!strcmp(input, "0"))
SCPY(input, "");
if (!strcmp(input, "1"))
@@ -90,7 +91,7 @@ int main(void)
SCAT(input, "/");
printf("\n\nFinally tell me where to write the mISDN rc file.\nEnter the name 'mISDN' for current directory.\nYou may want to say '/usr/local/lcr/mISDN' or '/etc/rc.d/mISDN'\n: "); fflush(stdout);
- scanf("%s", file);
+ ret = scanf("%s", file);
if (!(fp=fopen(file, "w"))) {
fprintf(stderr, "\nError: Failed to open '%s', try again.\n", file);
exit(EXIT_FAILURE);