commit e503084d4c88d85cf9b21ccd6537aec153787895
parent d89e2774304916e22e07b64b210a630ed5d63a0f
Author: paulnasca <paulnasca>
Date: Fri, 30 Jul 2004 21:31:19 +0000
*** empty log message ***
Diffstat:
14 files changed, 32 insertions(+), 35 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -669,6 +669,6 @@
29 Iul 2004 - Modificat modul cum este stocat lista de banci root dir
- Gasita o eroare care facea ca sa se stearga denormalkillbuffer inaintea lui master
30 Iul 2004 - Gasite si corectate o gramada de erori (eu stergeam elemente din ferestre si fltk le stergea din nou)
-
+ - Eliminate warning-urile
diff --git a/src/DSP/AnalogFilter.C b/src/DSP/AnalogFilter.C
@@ -317,7 +317,7 @@ void AnalogFilter::singlefilterout(REALTYPE *smp,fstage &x,fstage &y,REALTYPE *c
};
};
void AnalogFilter::filterout(REALTYPE *smp){
- REALTYPE *ismp;//used if it needs interpolation
+ REALTYPE *ismp=NULL;//used if it needs interpolation
int i;
if (needsinterpolation!=0){
ismp=new REALTYPE[SOUND_BUFFER_SIZE];
diff --git a/src/DSP/SVFilter.C b/src/DSP/SVFilter.C
@@ -127,7 +127,7 @@ void SVFilter::singlefilterout(REALTYPE *smp,fstage &x,parameters &par){
void SVFilter::filterout(REALTYPE *smp){
int i;
- REALTYPE *ismp;
+ REALTYPE *ismp=NULL;
if (needsinterpolation!=0){
ismp=new REALTYPE[SOUND_BUFFER_SIZE];
diff --git a/src/Makefile b/src/Makefile
@@ -1,7 +1,7 @@
include Makefile.inc
ifneq ($(MAKECMDGOALS),debug)
- CXXFLAGS= -O6 -Wall
+ CXXFLAGS= -O6 -Wall
else
CXXFLAGS= -O0 -ggdb -Wall -Wpointer-arith -Wstrict-prototypes
endif
diff --git a/src/Misc/Bank.C b/src/Misc/Bank.C
@@ -345,8 +345,6 @@ void Bank::swapslot(unsigned int n1, unsigned int n2){
*/
void Bank::rescanforbanks(){
- int start=0,end=0;
-
for (int i=0;i<MAX_NUM_BANKS;i++){
if (banks[i].dir!=NULL) delete (banks[i].dir);
if (banks[i].name!=NULL) delete (banks[i].name);
diff --git a/src/Misc/Buffer.C b/src/Misc/Buffer.C
@@ -258,7 +258,6 @@ void Buffer::putalldata(int n,unsigned char *d){
fprintf(stderr,"\n\n-= DUMP ALL DATA=-\n\n");
#endif
resetbuffer();
- int tmpmode=mode;
mode=1;//write
for (int k=0;k<n;k++) rwbyte(&d[k]);
diff --git a/src/Misc/Master.C b/src/Misc/Master.C
@@ -721,7 +721,7 @@ void Master::exportbankasxmldirectory(const char *bankfilename){
int pos=strlen(bankfilename)-20;
if (pos<0) pos=0;
snprintf(directory,1000,"export-%s",&bankfilename[pos]);
- for (int i=0;i<strlen(directory);i++){
+ for (int i=0;i<(int)strlen(directory);i++){
if ((directory[i]=='/')||(directory[i]=='\\')||(directory[i]=='.'))
directory[i]='_';
};
@@ -743,7 +743,7 @@ void Master::exportbankasxmldirectory(const char *bankfilename){
if (oldbank.emptyslot(slot)) continue;
snprintf(nostr,10,"%4d",slot+1);
- for (int i=0;i<strlen(nostr);i++) if (nostr[i]==' ') nostr[i]='0';
+ for (int i=0;i<(int)strlen(nostr);i++) if (nostr[i]==' ') nostr[i]='0';
snprintf(filename,1000,"%s/%s-%s.xiz",directory,nostr,oldbank.getname(slot));
printf("%s\n",filename);
diff --git a/src/Misc/Microtonal.C b/src/Misc/Microtonal.C
@@ -160,7 +160,7 @@ REALTYPE Microtonal::getnotefreq(int note,int keyshift){
*/
int Microtonal::linetotunings(unsigned int nline,const char *line){
int x1=-1,x2=-1,type=-1;
- REALTYPE x=-1.0,tmp,tuning;
+ REALTYPE x=-1.0,tmp,tuning=1.0;
if (strstr(line,"/")==NULL){
if (strstr(line,".")==NULL){// M case (M=M/1)
sscanf(line,"%d",&x1);
@@ -255,8 +255,10 @@ void Microtonal::texttomapping(const char *text){
lin[i]='\0';
if (strlen(lin)==0) continue;
- if (sscanf(lin,"%d",&Pmapping[tx])==0) Pmapping[tx]=-1;
- if (Pmapping[tx]<-1) Pmapping[tx]=-1;
+ int tmp=0;
+ if (sscanf(lin,"%d",&tmp)==0) tmp=-1;
+ if (tmp<-1) tmp=-1;
+ tmp=Pmapping[tx];
if ((tx++)>127) tx=127;
};
diff --git a/src/Misc/OldBank.C b/src/Misc/OldBank.C
@@ -40,9 +40,6 @@ OldBank::OldBank(){
ins[i].size=0;
ins[i].data=NULL;
};
-
- struct stat statbuf;
-
};
OldBank::~OldBank(){
@@ -264,12 +261,14 @@ int OldBank::savefile(){
void OldBank::changebankfilename(const char *newbankfilename,int ro){
if (bankfilename!=NULL) delete(bankfilename);
bankfilename=new char [strlen(newbankfilename)+2];
- sprintf(bankfilename,"%s\0",newbankfilename);
+ ZERO(bankfilename,(int) strlen(newbankfilename)+2);
+ sprintf(bankfilename,"%s",newbankfilename);
if (bankfiletitle!=NULL) delete(bankfiletitle);
bankfiletitle=new char [strlen(newbankfilename)+50];
- if (ro==0) sprintf(bankfiletitle,"OldBank: %s\0",newbankfilename);
- else sprintf(bankfiletitle,"OldBank: (LOCKED) %s\0",newbankfilename);
+ ZERO(bankfiletitle,(int) strlen(newbankfilename)+50);
+ if (ro==0) sprintf(bankfiletitle,"OldBank: %s",newbankfilename);
+ else sprintf(bankfiletitle,"OldBank: (LOCKED) %s",newbankfilename);
};
/*
diff --git a/src/Misc/XMLwrapper.C b/src/Misc/XMLwrapper.C
@@ -65,8 +65,8 @@ const char *XMLwrapper_whitespace_callback(mxml_node_t *node,int where){
XMLwrapper::XMLwrapper(){
- ZERO(&parentstack,sizeof(parentstack));
- ZERO(&values,sizeof(values));
+ ZERO(&parentstack,(int)sizeof(parentstack));
+ ZERO(&values,(int)sizeof(values));
stackpos=0;
@@ -190,8 +190,8 @@ int XMLwrapper::loadXMLfile(const char *filename){
if (tree!=NULL) mxmlDelete(tree);
tree=NULL;
- ZERO(&parentstack,sizeof(parentstack));
- ZERO(&values,sizeof(values));
+ ZERO(&parentstack,(int)sizeof(parentstack));
+ ZERO(&values,(int)sizeof(values));
stackpos=0;
diff --git a/src/Seq/MIDIEvents.C b/src/Seq/MIDIEvents.C
@@ -39,7 +39,7 @@ void MIDIEvents::writeevent(list *l,event *ev){
if (l->current!=NULL) l->current->next=tmp;
else l->first=tmp;
l->current=tmp;
- printf("Wx%x ",l->current);
+ printf("Wx%x ",(int) l->current);
printf("-> %d \n",l->current->ev.deltatime);
l->size++;
};
@@ -56,8 +56,8 @@ void MIDIEvents::readevent(list *l,event *ev){
if (l->current!=NULL) {
// ev->deltatime=10000;
// printf("Rx%d\n",l->current->ev.deltatime);
- printf("Rx%x ",l->current);
- printf("-> %d (next=%x) \n",l->current->ev.deltatime,l->current->next);
+ printf("Rx%x ",(int) l->current);
+ printf("-> %d (next=%x) \n",(int)l->current->ev.deltatime,(int)l->current->next);
};
};
diff --git a/src/Seq/MIDIFile.C b/src/Seq/MIDIFile.C
@@ -217,6 +217,7 @@ void MIDIFile::parsenoteoff(char ntrack,char chan,unsigned int dt){
note=getbyte();
unsigned char noteoff_velocity=getbyte();//unused by zynaddsubfx
+ noteoff_velocity=0;
if (chan>=NUM_MIDI_CHANNELS) return;
me->tmpevent.deltatime=convertdt(dt);
diff --git a/src/UI/PartUI.fl b/src/UI/PartUI.fl
@@ -274,7 +274,7 @@ end();} {}
decl {PartUI_ *partui;} {}
}
-class PartUI {open : {public Fl_Group,PartUI_}
+class PartUI {: {public Fl_Group,PartUI_}
} {
Function {make_window()} {private
} {
@@ -703,9 +703,9 @@ if (x==2) part->partefx[ninseff]->setdryonly(true);
}
Fl_Check_Button bypasseff {
label bypass
- callback {part->Pefxbypass[ninseff]=(((int)o->value())!=0);}
+ callback {part->Pefxbypass[ninseff]=(((int)o->value())!=0);} selected
tooltip {if the effect is not used (is bypassed)} xywh {90 110 60 15} down_box DOWN_BOX labelsize 12
- code0 {int x=part->Pefxbypass[ninseff];}
+ code0 {int x=part->Pefxbypass[ninseff];o->value(x);}
}
}
Fl_Window instrumentkitlist {
@@ -1115,8 +1115,7 @@ if ((engine==0)&&(adnoteui!=NULL)) adnoteui->ADnoteGlobalParameters->show();
if ((engine==1)&&(subnoteui!=NULL)) subnoteui->SUBparameters->show();
if ((engine==2)&&(adnoteui!=NULL)) padnoteui->padnotewindow->show();} {}
}
- Function {~PartUI()} {open
- } {
+ Function {~PartUI()} {} {
code {if (adnoteui!=NULL) delete (adnoteui);
if (subnoteui!=NULL) delete (subnoteui);
if (padnoteui!=NULL) delete (padnoteui);
@@ -1134,8 +1133,7 @@ instrumentkitlist->hide();
delete(instrumentkitlist);
instrumenteditwindow->hide();
-delete(instrumenteditwindow);} {selected
- }
+delete(instrumenteditwindow);} {}
}
decl {Part *part;} {}
decl {Master *master;} {}
diff --git a/src/main.C b/src/main.C
@@ -86,7 +86,7 @@ void set_realtime(){
sched_param sc;
sc.sched_priority=50;
- int err=sched_setscheduler(0,SCHED_FIFO,&sc);
+// int err=sched_setscheduler(0,SCHED_FIFO,&sc);
// if (err==0) printf("Real-time");
#endif
};
@@ -155,7 +155,7 @@ void *thread2(void *arg){
};
write(1,&xsmps,SOUND_BUFFER_SIZE*2*2);
- /**/
+ / * */
};
return(0);
};
@@ -389,7 +389,7 @@ int main(int argc, char *argv[]){
OSCIL_SIZE=tmp;
if (OSCIL_SIZE<MAX_AD_HARMONICS*2) OSCIL_SIZE=MAX_AD_HARMONICS*2;
OSCIL_SIZE=(int) pow(2,ceil(log (OSCIL_SIZE-1.0)/log(2.0)));
- if (tmp!=OSCIL_SIZE) fprintf(stderr,"%s","\nOSCIL_SIZE is wrong (must me 2^n) or too small. Adjusting to %d.\n",OSCIL_SIZE);
+ if (tmp!=OSCIL_SIZE) fprintf(stderr,"\nOSCIL_SIZE is wrong (must me 2^n) or too small. Adjusting to %d.\n",OSCIL_SIZE);
break;
case 'S':swaplr=1;
break;