Author: adrian
Date: Tue Aug 16 07:51:05 2016
New Revision: 304207
URL: https://svnweb.freebsd.org/changeset/base/304207

Log:
  [mips] fix use-before-initialised.
  
  Found by: gcc-5.3

Modified:
  head/sys/mips/mips/cpu.c

Modified: head/sys/mips/mips/cpu.c
==============================================================================
--- head/sys/mips/mips/cpu.c    Tue Aug 16 07:45:35 2016        (r304206)
+++ head/sys/mips/mips/cpu.c    Tue Aug 16 07:51:05 2016        (r304207)
@@ -164,6 +164,8 @@ mips_get_identity(struct mips_cpuinfo *c
        cfg1 = mips_rd_config1();
 
        /* Get the Config2 and Config3 registers as well. */
+       cfg2 = 0;
+       cfg3 = 0;
        if (cfg1 & MIPS_CONFIG1_M) {
                cfg2 = mips_rd_config2();
                if (cfg2 & MIPS_CONFIG2_M)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to