From 74dfe80e2116d527e0768e773de711c7df1e7839 Mon Sep 17 00:00:00 2001 From: Chris Pavlina Date: Fri, 17 Mar 2017 22:15:23 -0400 Subject: [PATCH] Fix warning about creation of null reference This is a code path that should never run. --- kicad/kicad.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 8dc657fe2c..00edea617f 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2004-2017 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -38,6 +38,7 @@ #include #include #include +#include #include "pgm_kicad.h" @@ -53,7 +54,7 @@ KIFACE_I& Kiface() // not to be actually called. wxLogFatalError( wxT( "Unexpected call to Kiface() in kicad/kicad.cpp" ) ); - return (KIFACE_I&) *(KIFACE_I*) 0; + throw std::logic_error( "Unexpected call to Kiface() in kicad/kicad.cpp" ); } static PGM_KICAD program;