Skip to content

Commit 86cd325

Browse files
committed
Fix warnings
1 parent d93d9da commit 86cd325

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

lib/docurium.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ def show_warnings(data)
266266

267267
# check for changed signatures
268268
sigchanges = []
269-
@sigs.each do |fun, data|
270-
if data[:changes]['HEAD']
269+
@sigs.each do |fun, sig_data|
270+
if sig_data[:changes]['HEAD']
271271
sigchanges << fun
272272
end
273273
end
@@ -383,7 +383,6 @@ def group_functions!(data)
383383
func[group] << key
384384
func[group].sort!
385385
end
386-
misc = []
387386
func.to_a.sort
388387
end
389388

@@ -395,7 +394,7 @@ def find_type_usage!(data)
395394
h.merge!(data[:callbacks])
396395
h.each do |func, fdata|
397396
data[:types].each_with_index do |tdata, i|
398-
type, typeData = tdata
397+
type = tdata[0]
399398
data[:types][i][1][:used] ||= {:returns => [], :needs => []}
400399
if fdata[:return][:type].index(/#{type}[ ;\)\*]?/)
401400
data[:types][i][1][:used][:returns] << func

lib/docurium/docparser.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ def parse_file(orig_filename, files)
3030

3131
FileUtils.remove_entry(tmpdir)
3232

33-
cursor = tu.cursor
34-
3533
recs = []
3634

37-
cursor.visit_children do |cursor, parent|
35+
tu.cursor.visit_children do |cursor, parent|
3836
#puts "visiting #{cursor.kind} - #{cursor.spelling}"
3937
location = cursor.location
4038
next :continue if location.file == nil

test/docurium_test.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ def setup
99

1010
@repo = Rugged::Repository.init_at(@dir, :bare)
1111

12-
config = <<END
13-
{
14-
"name": "libgit2",
15-
"github": "libgit2/libgit2",
16-
"prefix": "git_",
17-
"branch": "gh-pages"
18-
}
19-
END
20-
2112
# Create an index as we would have read from the user's repository
2213
index = Rugged::Index.new
2314
headers = File.dirname(__FILE__) + '/fixtures/git2/'

0 commit comments

Comments
 (0)