# theora in VTK 8.2.0 produces an error

**URL:** https://discourse.vtk.org/t/theora-in-vtk-8-2-0-produces-an-error/515
**Category:** Support
**Created:** [March 18, 2019, 12:21pm UTC](https://discourse.vtk.org/t/theora-in-vtk-8-2-0-produces-an-error/515 "2019-03-18T12:21:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Kenta\_Kabashima](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kenta_kabashima/32/314_2.png) [@Kenta\_Kabashima](https://discourse.vtk.org/u/Kenta_Kabashima)
#### Post date: [March 18, 2019, 12:21pm UTC](https://discourse.vtk.org/t/theora-in-vtk-8-2-0-produces-an-error/515/1 "2019-03-18T12:21:27Z")

</div>

I’m using VTK 8.2.0 with Visual Studio 2017.  
When using debug build of VTK, an error about use of an uninitialized variable was detected at line 326 in “ThirdParty\theora\vtktheora\lib\analyze.c” as follows:

```
static void oc_fr_state_advance_block(oc_fr_state *_fr,int _b_coded){
  ptrdiff_t bits;
  int b_coded_count;
  int b_count;
  int sb_partial;
  int sb_full=sb_full; // this line uses "sb_full" before the initialization

```

How can I fix it ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [March 19, 2019, 6:23pm UTC](https://discourse.vtk.org/t/theora-in-vtk-8-2-0-produces-an-error/515/2 "2019-03-19T18:23:11Z")

</div>

Hmm. This is a pattern used to “trick” the compiler into thinking the variable is actually initialized. I think you can replace it with `sb_full=0` for now. Theora upstream is pretty dead these days, so before going too far on the “let’s fix all the warnings in libtheora”, maybe we should discuss what to do about it.
