summaryrefslogtreecommitdiff
path: root/recordmydesktop
diff options
context:
space:
mode:
authorenselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-09-13 07:38:24 +0000
committerenselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-09-13 07:38:24 +0000
commitecc7ccf4143ad100ddffa2ce99845a384341f369 (patch)
treed2f5947df3e3bec92a4bc8f13e8d436fe8415949 /recordmydesktop
parent884ef88a4d746564994c9ba7cceaeecde1975f9c (diff)
src/opendev.c: Explain why the compiler might warn us.
src/specsfile.c: Fix compiler warnings. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@523 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop')
-rw-r--r--recordmydesktop/src/opendev.c4
-rw-r--r--recordmydesktop/src/specsfile.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/recordmydesktop/src/opendev.c b/recordmydesktop/src/opendev.c
index 45ce2d0..7ea7f9d 100644
--- a/recordmydesktop/src/opendev.c
+++ b/recordmydesktop/src/opendev.c
@@ -58,8 +58,10 @@ snd_pcm_t *OpenDev( const char *pcm_dev,
snd_pcm_hw_params_t *hwparams;
unsigned int periods=2;
unsigned int exactrate = *frequency;
- snd_pcm_hw_params_alloca(&hwparams);
+ // The compiler might warn us because the expansion starts with
+ // assert(&hwparams)
+ snd_pcm_hw_params_alloca(&hwparams);
if (snd_pcm_open(&mhandle,pcm_dev,SND_PCM_STREAM_CAPTURE,SND_PCM_ASYNC)<0){
fprintf(stderr, "Couldn't open PCM device %s\n", pcm_dev);
diff --git a/recordmydesktop/src/specsfile.c b/recordmydesktop/src/specsfile.c
index ffc89ec..bc61ea4 100644
--- a/recordmydesktop/src/specsfile.c
+++ b/recordmydesktop/src/specsfile.c
@@ -53,9 +53,9 @@ int WriteSpecsFile(ProgData *pdata){
fprintf(fp,"NoSound = %d\n",pdata->args.nosound);
fprintf(fp,"Frequency = %d\n",pdata->args.frequency);
fprintf(fp,"Channels = %d\n",pdata->args.channels);
- fprintf(fp,"BufferSize = %d\n",pdata->args.buffsize);
+ fprintf(fp,"BufferSize = %lu\n",pdata->args.buffsize);
fprintf(fp,"SoundFrameSize = %d\n",pdata->sound_framesize);
- fprintf(fp,"PeriodSize = %u\n",pdata->periodsize);
+ fprintf(fp,"PeriodSize = %lu\n",pdata->periodsize);
fprintf(fp,"UsedJack = %d\n",pdata->args.use_jack);
fprintf(fp,"v_bitrate = %d\n",pdata->args.v_bitrate);
fprintf(fp,"v_quality = %d\n",pdata->args.v_quality);
@@ -121,7 +121,7 @@ int ReadSpecsFile(ProgData *pdata){
fprintf(stderr,"Error reading Channels attribute!!!\n");
return 1;
}
- if(fscanf(fp,"BufferSize = %d\n",&pdata->args.buffsize)!=1){
+ if(fscanf(fp,"BufferSize = %lu\n",&pdata->args.buffsize)!=1){
fprintf(stderr,"Error reading BufferSize attribute!!!\n");
return 1;
}
@@ -129,7 +129,7 @@ int ReadSpecsFile(ProgData *pdata){
fprintf(stderr,"Error reading SoundFrameSize attribute!!!\n");
return 1;
}
- if(fscanf(fp,"PeriodSize = %u\n",&pdata->periodsize)!=1){
+ if(fscanf(fp,"PeriodSize = %lu\n",&pdata->periodsize)!=1){
fprintf(stderr,"Error reading PeriodSize attribute!!!\n");
return 1;
}
© All Rights Reserved