L
Levi Campbell
Hi, I'm trying to debug an app someone else wrote called eMixer. Here's
the log contents:
cc -O3 -funroll-loops -c -o main.o main.c
cc -O3 -funroll-loops -c -o nctgui.o nctgui.c
cc -O3 -funroll-loops -c -o mixer.o mixer.c
mixer.c: In function `open_soundcard_alsa':
mixer.c:201: warning: passing arg 3 of
`snd_pcm_hw_params_set_rate_near' makes pointer from integer without a
cast
cc -O3 -funroll-loops -c -o getlopt.o getlopt.c
cc -O3 -funroll-loops -c -o plstfunc.o plstfunc.c
cc -O3 -funroll-loops -c -o playfunc.o playfunc.c
playfunc.c: In function `do_autofade':
playfunc.c:524: error: initializer element is not constant
playfunc.c:524: error: (near initialization for `checkmode[0][0]')
playfunc.c:524: error: initializer element is not constant
playfunc.c:524: error: (near initialization for `checkmode[0][1]')
playfunc.c:524: error: initializer element is not constant
playfunc.c:524: error: (near initialization for `checkmode[0]')
And the line in question looks like this:
static int checkmode[3][2]={(0,0,0),(0,0,0)};
To try and solve this problem, I've commented out the static part and
while the program compiles, it segfaults when you try and run it. I've
also tried adding -ansi to the CFLAGS but that doesn't work. When I
searched the web, I got lots of hits about other people having the same
problem, but the code wasen't close enough that I could get an idea of
how thhe problem was fixed. does anyone have any ideas about what I
need to do here? Thank you for your time.
the log contents:
cc -O3 -funroll-loops -c -o main.o main.c
cc -O3 -funroll-loops -c -o nctgui.o nctgui.c
cc -O3 -funroll-loops -c -o mixer.o mixer.c
mixer.c: In function `open_soundcard_alsa':
mixer.c:201: warning: passing arg 3 of
`snd_pcm_hw_params_set_rate_near' makes pointer from integer without a
cast
cc -O3 -funroll-loops -c -o getlopt.o getlopt.c
cc -O3 -funroll-loops -c -o plstfunc.o plstfunc.c
cc -O3 -funroll-loops -c -o playfunc.o playfunc.c
playfunc.c: In function `do_autofade':
playfunc.c:524: error: initializer element is not constant
playfunc.c:524: error: (near initialization for `checkmode[0][0]')
playfunc.c:524: error: initializer element is not constant
playfunc.c:524: error: (near initialization for `checkmode[0][1]')
playfunc.c:524: error: initializer element is not constant
playfunc.c:524: error: (near initialization for `checkmode[0]')
And the line in question looks like this:
static int checkmode[3][2]={(0,0,0),(0,0,0)};
To try and solve this problem, I've commented out the static part and
while the program compiles, it segfaults when you try and run it. I've
also tried adding -ansi to the CFLAGS but that doesn't work. When I
searched the web, I got lots of hits about other people having the same
problem, but the code wasen't close enough that I could get an idea of
how thhe problem was fixed. does anyone have any ideas about what I
need to do here? Thank you for your time.