Skip to content
Snippets Groups Projects

Dropped self assignment when initialising variables in tokenize.c.

Merged Petter Reinholdtsen requested to merge no-self-assign into master
  1. Mar 09, 2025
    • Petter Reinholdtsen's avatar
      Dropped self assignment when initialising variables in tokenize.c. · 3b5aee3f
      Petter Reinholdtsen authored
      The 'int x=x' style statement do not make sense and cause problems with
      some compilers.  Replace it with more sensible initializers to ensure
      the value have a well known starting point.  Using initializers
      proposed by Timothy B. Terriberry in !25.
      
      Added -Werror=uninitialized -Winit-self to default GCC build to ensure
      this style of statement do not sneak into the code again.
      
      Fixes #2317
      3b5aee3f
Loading