diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index 1de3d166f70bb80e0c31afb062d9f771968b8328..289038ced52c15e9c4a738514897f04a3c2df5b3 100644
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -176,7 +176,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
 
 static int pcm_seek(struct ast_filestream *fs, long sample_offset, int whence)
 {
-	long cur, max, offset;
+	long cur, max, offset = 0;
 
 	cur = ftell(fs->f);
 	fseek(fs->f, 0, SEEK_END);
diff --git a/formats/format_pcm_alaw.c b/formats/format_pcm_alaw.c
index a738cf07b08581c619cf11a27d559fbcd6e7814c..13d7c174a8937554edeacb5db7134428e2b9c8ed 100644
--- a/formats/format_pcm_alaw.c
+++ b/formats/format_pcm_alaw.c
@@ -251,7 +251,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
 
 static int pcm_seek(struct ast_filestream *fs, long sample_offset, int whence)
 {
-	long cur, max, offset;
+	long cur, max, offset = 0;
 
 	cur = ftell(fs->f);
 	fseek(fs->f, 0, SEEK_END);