Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
4c6ca81f
Commit
4c6ca81f
authored
Feb 22, 2015
by
Wayne Stambaugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More Coverity scan error fixes.
parent
7e80e720
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
77 additions
and
63 deletions
+77
-63
dsnlexer.cpp
common/dsnlexer.cpp
+3
-2
fp_lib_table.cpp
common/fp_lib_table.cpp
+2
-1
kiway_player.cpp
common/kiway_player.cpp
+4
-2
backanno.cpp
eeschema/backanno.cpp
+3
-2
sch_sheet.cpp
eeschema/sch_sheet.cpp
+2
-2
schframe.h
eeschema/schframe.h
+2
-1
dsnlexer.h
include/dsnlexer.h
+1
-1
fp_lib_table.h
include/fp_lib_table.h
+2
-1
routing_matrix.cpp
pcbnew/autorouter/routing_matrix.cpp
+11
-8
spread_footprints.cpp
pcbnew/autorouter/spread_footprints.cpp
+6
-2
connect.cpp
pcbnew/connect.cpp
+3
-1
connect.h
pcbnew/connect.h
+1
-1
drag.h
pcbnew/drag.h
+4
-2
eagle_plugin.cpp
pcbnew/eagle_plugin.cpp
+5
-3
eagle_plugin.h
pcbnew/eagle_plugin.h
+1
-2
kicad_netlist_reader.cpp
pcbnew/kicad_netlist_reader.cpp
+5
-4
kicad_plugin.cpp
pcbnew/kicad_plugin.cpp
+2
-0
netlist_reader.h
pcbnew/netlist_reader.h
+3
-3
pcb_parser.cpp
pcbnew/pcb_parser.cpp
+1
-1
pcb_parser.h
pcbnew/pcb_parser.h
+1
-1
zones_functions_for_undo_redo.cpp
pcbnew/zones_functions_for_undo_redo.cpp
+15
-23
No files found.
common/dsnlexer.cpp
View file @
4c6ca81f
...
...
@@ -3,7 +3,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007-2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2007
-2015
KiCad Developers, see change_log.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
...
...
@@ -50,9 +50,10 @@ void DSNLEXER::init()
specctraMode
=
false
;
space_in_quoted_tokens
=
false
;
commentsAreTokens
=
false
;
curOffset
=
0
;
#if 1
if
(
keywordCount
>
11
)
{
...
...
common/fp_lib_table.cpp
View file @
4c6ca81f
...
...
@@ -761,7 +761,8 @@ void FP_LIB_TABLE::Load( const wxString& aFileName )
}
void
FP_LIB_TABLE
::
Save
(
const
wxString
&
aFileName
)
const
throw
(
IO_ERROR
)
void
FP_LIB_TABLE
::
Save
(
const
wxString
&
aFileName
)
const
throw
(
IO_ERROR
,
boost
::
interprocess
::
lock_exception
)
{
FILE_OUTPUTFORMATTER
sf
(
aFileName
);
Format
(
&
sf
,
0
);
...
...
common/kiway_player.cpp
View file @
4c6ca81f
...
...
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
* Copyright (C) 2014
-2015
KiCad Developers, see CHANGELOG.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
...
...
@@ -57,7 +57,9 @@ KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& a
EDA_BASE_FRAME
(
aParent
,
(
FRAME_T
)
aId
,
aTitle
,
aPos
,
aSize
,
aStyle
,
aWdoName
),
KIWAY_HOLDER
(
0
),
m_modal
(
false
),
m_modal_loop
(
0
),
m_modal_resultant_parent
(
0
)
m_modal_loop
(
0
),
m_modal_resultant_parent
(
0
),
m_modal_ret_val
(
false
)
{
// DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );)
}
...
...
eeschema/backanno.cpp
View file @
4c6ca81f
...
...
@@ -3,7 +3,7 @@
*
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-201
1
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2004-201
5
KiCad Developers, see change_log.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
...
...
@@ -48,7 +48,8 @@
#include <wx/choicdlg.h>
void
SCH_EDIT_FRAME
::
backAnnotateFootprints
(
const
std
::
string
&
aChangedSetOfReferences
)
throw
(
IO_ERROR
)
void
SCH_EDIT_FRAME
::
backAnnotateFootprints
(
const
std
::
string
&
aChangedSetOfReferences
)
throw
(
IO_ERROR
,
boost
::
bad_pointer
)
{
// Build a flat list of components in schematic:
SCH_REFERENCE_LIST
refs
;
...
...
eeschema/sch_sheet.cpp
View file @
4c6ca81f
...
...
@@ -53,8 +53,8 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) :
m_sheetNameSize
=
GetDefaultTextSize
();
m_fileNameSize
=
GetDefaultTextSize
();
m_screen
=
NULL
;
m_name
.
Printf
(
wxT
(
"Sheet%8.8lX"
),
m_TimeStamp
);
m_fileName
.
Printf
(
wxT
(
"file%8.8lX.sch"
),
m_TimeStamp
);
m_name
.
Printf
(
wxT
(
"Sheet%8.8lX"
),
(
long
)
m_TimeStamp
);
m_fileName
.
Printf
(
wxT
(
"file%8.8lX.sch"
),
(
long
)
m_TimeStamp
);
}
...
...
eeschema/schframe.h
View file @
4c6ca81f
...
...
@@ -203,7 +203,8 @@ protected:
void
updateFindReplaceView
(
wxFindDialogEvent
&
aEvent
);
void
backAnnotateFootprints
(
const
std
::
string
&
aChangedSetOfReferences
)
throw
(
IO_ERROR
);
void
backAnnotateFootprints
(
const
std
::
string
&
aChangedSetOfReferences
)
throw
(
IO_ERROR
,
boost
::
bad_pointer
);
public
:
SCH_EDIT_FRAME
(
KIWAY
*
aKiway
,
wxWindow
*
aParent
);
...
...
include/dsnlexer.h
View file @
4c6ca81f
...
...
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2007-2010 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2007 Kicad Developers, see change_log.txt for contributors.
* Copyright (C) 2007
-2015
Kicad Developers, see change_log.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
...
...
include/fp_lib_table.h
View file @
4c6ca81f
...
...
@@ -581,7 +581,8 @@ public:
* writes this table to aFileName in s-expression form.
* @param aFileName is the name of the file to write to.
*/
void
Save
(
const
wxString
&
aFileName
)
const
throw
(
IO_ERROR
);
void
Save
(
const
wxString
&
aFileName
)
const
throw
(
IO_ERROR
,
boost
::
interprocess
::
lock_exception
);
protected
:
...
...
pcbnew/autorouter/routing_matrix.cpp
View file @
4c6ca81f
...
...
@@ -5,7 +5,7 @@
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
*
* Copyright (C) 1992-201
2
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see change_log.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
...
...
@@ -50,10 +50,14 @@ MATRIX_ROUTING_HEAD::MATRIX_ROUTING_HEAD()
m_BoardSide
[
0
]
=
m_BoardSide
[
1
]
=
NULL
;
m_DistSide
[
0
]
=
m_DistSide
[
1
]
=
NULL
;
m_DirSide
[
0
]
=
m_DirSide
[
1
]
=
NULL
;
m_opWriteCell
=
NULL
;
m_InitMatrixDone
=
false
;
m_Nrows
=
m_Ncols
=
0
;
m_Nrows
=
0
;
m_Ncols
=
0
;
m_MemSize
=
0
;
m_RoutingLayersCount
=
1
;
m_GridRouting
=
0
;
m_RouteCount
=
0
;
}
...
...
@@ -96,7 +100,6 @@ bool MATRIX_ROUTING_HEAD::ComputeMatrixSize( BOARD* aPcb, bool aUseBoardEdgesOnl
}
int
MATRIX_ROUTING_HEAD
::
InitRoutingMatrix
()
{
if
(
m_Nrows
<=
0
||
m_Ncols
<=
0
)
...
...
pcbnew/autorouter/spread_footprints.cpp
View file @
4c6ca81f
...
...
@@ -5,7 +5,7 @@
* Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net>
*
* Copyright (C) 1992-201
3
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
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
...
...
@@ -51,7 +51,11 @@ struct TSubRect : public CRectPlacement::TRect
{
int
n
;
// Original index of this subrect, before sorting
TSubRect
()
{
}
TSubRect
()
:
TRect
(),
n
(
0
)
{
}
TSubRect
(
int
_w
,
int
_h
,
int
_n
)
:
TRect
(
0
,
0
,
_w
,
_h
),
n
(
_n
)
{
}
};
...
...
pcbnew/connect.cpp
View file @
4c6ca81f
...
...
@@ -8,7 +8,7 @@
*
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-201
2
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
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
...
...
@@ -48,6 +48,8 @@ static void RebuildTrackChain( BOARD* pcb );
CONNECTIONS
::
CONNECTIONS
(
BOARD
*
aBrd
)
{
m_brd
=
aBrd
;
m_firstTrack
=
NULL
;
m_lastTrack
=
NULL
;
}
...
...
pcbnew/connect.h
View file @
4c6ca81f
...
...
@@ -10,7 +10,7 @@
*
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-201
2
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
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
...
...
pcbnew/drag.h
View file @
4c6ca81f
...
...
@@ -7,7 +7,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-201
2
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see change_log.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
...
...
@@ -122,6 +122,8 @@ public:
DRAG_LIST
(
BOARD
*
aPcb
)
{
m_Brd
=
aPcb
;
m_Module
=
NULL
;
m_Pad
=
NULL
;
}
/**
...
...
pcbnew/eagle_plugin.cpp
View file @
4c6ca81f
...
...
@@ -3,7 +3,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2012
-2015
KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1209,7 +1209,9 @@ BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const
void
EAGLE_PLUGIN
::
init
(
const
PROPERTIES
*
aProperties
)
{
m_hole_count
=
0
;
m_min_trace
=
0
;
m_min_via
=
0
;
m_min_via_hole
=
0
;
m_xpath
->
clear
();
m_pads_to_nets
.
clear
();
...
...
pcbnew/eagle_plugin.h
View file @
4c6ca81f
...
...
@@ -5,8 +5,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2012-2015 KiCad Developers, see change_log.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
...
...
pcbnew/kicad_netlist_reader.cpp
View file @
4c6ca81f
...
...
@@ -5,7 +5,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2011 Jean-Pierre Charras.
* Copyright (C) 1992-201
1
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see change_log.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
...
...
@@ -57,6 +57,7 @@ KICAD_NETLIST_PARSER::KICAD_NETLIST_PARSER( LINE_READER* aReader, NETLIST* aNetl
{
m_lineReader
=
aReader
;
m_netlist
=
aNetlist
;
token
=
T_NONE
;
}
...
...
@@ -269,7 +270,7 @@ void KICAD_NETLIST_PARSER::parseNet() throw( IO_ERROR, PARSE_ERROR )
}
void
KICAD_NETLIST_PARSER
::
parseComponent
()
throw
(
IO_ERROR
,
PARSE_ERROR
)
void
KICAD_NETLIST_PARSER
::
parseComponent
()
throw
(
IO_ERROR
,
PARSE_ERROR
,
boost
::
bad_pointer
)
{
/* Parses a section like
* (comp (ref P1)
...
...
pcbnew/kicad_plugin.cpp
View file @
4c6ca81f
...
...
@@ -1773,6 +1773,8 @@ BOARD* PCB_IO::Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPER
void
PCB_IO
::
init
(
const
PROPERTIES
*
aProperties
)
{
m_board
=
NULL
;
m_reader
=
NULL
;
m_loading_format_version
=
SEXPR_BOARD_FILE_VERSION
;
m_props
=
aProperties
;
}
...
...
pcbnew/netlist_reader.h
View file @
4c6ca81f
...
...
@@ -9,8 +9,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras.
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@
verizon.net
>.
* Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors.
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@
gmail.com
>.
* Copyright (C) 2012
-2015
KiCad Developers, see CHANGELOG.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
...
...
@@ -309,7 +309,7 @@ private:
* (sheetpath (names /) (tstamps /))
* (tstamp 3256759C))
*/
void
parseComponent
()
throw
(
IO_ERROR
,
PARSE_ERROR
);
void
parseComponent
()
throw
(
IO_ERROR
,
PARSE_ERROR
,
boost
::
bad_pointer
);
/**
* Function parseNet
...
...
pcbnew/pcb_parser.cpp
View file @
4c6ca81f
...
...
@@ -188,7 +188,7 @@ wxPoint PCB_PARSER::parseXY() throw( PARSE_ERROR, IO_ERROR )
}
void
PCB_PARSER
::
parseXY
(
int
*
aX
,
int
*
aY
)
throw
(
PARSE_ERROR
)
void
PCB_PARSER
::
parseXY
(
int
*
aX
,
int
*
aY
)
throw
(
PARSE_ERROR
,
IO_ERROR
)
{
wxPoint
pt
=
parseXY
();
...
...
pcbnew/pcb_parser.h
View file @
4c6ca81f
...
...
@@ -174,7 +174,7 @@ class PCB_PARSER : public PCB_LEXER
*/
wxPoint
parseXY
()
throw
(
PARSE_ERROR
,
IO_ERROR
);
void
parseXY
(
int
*
aX
,
int
*
aY
)
throw
(
PARSE_ERROR
);
void
parseXY
(
int
*
aX
,
int
*
aY
)
throw
(
PARSE_ERROR
,
IO_ERROR
);
/**
* Function parseEDA_TEXT
...
...
pcbnew/zones_functions_for_undo_redo.cpp
View file @
4c6ca81f
...
...
@@ -6,7 +6,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2009 Jean-Pierre Charras <jp.charras@wanadoo.fr>
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2007
-2015
KiCad Developers, see change_log.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
...
...
@@ -204,6 +204,8 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
PICKED_ITEMS_LIST
&
aAuxiliaryList
,
BOARD
*
aPcb
)
{
wxLogDebug
(
wxT
(
"Inside UpdadeCopyOfZonesList()."
)
);
for
(
unsigned
kk
=
0
;
kk
<
aPickList
.
GetCount
();
kk
++
)
{
UNDO_REDO_T
status
=
aPickList
.
GetPickedItemStatus
(
kk
);
...
...
@@ -225,6 +227,7 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
if
(
status
==
UR_NEW
)
{
delete
ref
;
ref
=
NULL
;
aPickList
.
RemovePicker
(
kk
);
kk
--
;
}
...
...
@@ -233,10 +236,10 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
ZONE_CONTAINER
*
zcopy
=
(
ZONE_CONTAINER
*
)
aPickList
.
GetPickedItemLink
(
kk
);
aPickList
.
SetPickedItemStatus
(
UR_DELETED
,
kk
);
if
(
zcopy
)
wxASSERT_MSG
(
zcopy
!=
NULL
,
wxT
(
"UpdateCopyOfZonesList() error: link = NULL"
)
);
ref
->
Copy
(
zcopy
);
else
wxMessageBox
(
wxT
(
"UpdateCopyOfZonesList() error: link = NULL"
)
);
// the copy was deleted; the link does not exists now.
aPickList
.
SetPickedItemLink
(
NULL
,
kk
);
...
...
@@ -248,7 +251,7 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
for
(
unsigned
nn
=
0
;
nn
<
aAuxiliaryList
.
GetCount
();
nn
++
)
{
if
(
aAuxiliaryList
.
GetPickedItem
(
nn
)
==
ref
)
if
(
ref
!=
NULL
&&
aAuxiliaryList
.
GetPickedItem
(
nn
)
==
ref
)
{
aAuxiliaryList
.
RemovePicker
(
nn
);
notfound
=
false
;
...
...
@@ -256,11 +259,12 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
}
}
if
(
notfound
)
wxMessageBox
(
wxT
(
"UpdateCopyOfZonesList() error: item not found in aAuxiliaryList"
)
);
wxASSERT_MSG
(
notfound
!=
true
,
wxT
(
"UpdateCopyOfZonesList() error: item not found in "
"aAuxiliaryList"
)
);
break
;
}
if
(
zone
==
ref
)
// picked zone found
{
if
(
aPickList
.
GetPickedItemStatus
(
kk
)
!=
UR_NEW
)
...
...
@@ -280,7 +284,6 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
}
}
// Add new zones in main pick list, and remove pickers from Auxiliary List
for
(
unsigned
ii
=
0
;
ii
<
aAuxiliaryList
.
GetCount
();
)
{
...
...
@@ -300,17 +303,6 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
}
// Should not occur:
if
(
aAuxiliaryList
.
GetCount
()
>
0
)
{
wxString
msg
;
msg
.
Printf
(
wxT
(
"UpdateCopyOfZonesList() error: aAuxiliaryList not void: %d item left (status %d)"
),
aAuxiliaryList
.
GetCount
(),
aAuxiliaryList
.
GetPickedItemStatus
(
0
)
);
wxMessageBox
(
msg
);
while
(
aAuxiliaryList
.
GetCount
()
>
0
)
{
delete
aAuxiliaryList
.
GetPickedItemLink
(
0
);
aAuxiliaryList
.
RemovePicker
(
0
);
}
}
wxASSERT_MSG
(
aAuxiliaryList
.
GetCount
()
==
0
,
wxT
(
"UpdateCopyOfZonesList() error: aAuxiliaryList not empty."
)
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment