Closed Bug 663392 Opened 13 years ago Closed 10 days ago

Fix issues found by clang and llvm

Categories

(Camino Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: stuart.morgan+bugzilla, Assigned: stuart.morgan+bugzilla)

Details

Attachments

(6 files)

As a way of playing with the new static analysis tools in clang, and the different warnings/errors in llvm, I managed to hack up a Camino build using llvm. It found a few real bugs, a handful of random style issues, and some places where we need to be more explicit about what we are doing to make it happy.

I'm going to fix the first two categories, and maybe the second; I'll use this bug as a convenient way to collect all the patches (I'll do one per conceptual change) since many of these things are so minor they don't warrant their own bugs.
Not dangerous, since it's just an int, but it would give garbage output.
Fixes a possible crasher if importing bookmarks fails.
We're always trying to remove the old classifier DB, even when it's not there. Should be harmless, since it should error silently.
This should never happen, but better safe than sorry.
Attachment #538717 - Attachment description: Add missing arguments to log statements → Add missing arguments to log statements [landed]
Attachment #538719 - Attachment description: Fix an overrelease if something goes wrong during import → Fix an overrelease if something goes wrong during import [landed]
Attachment #538720 - Attachment description: Removes a stray semicolon that causes an if to be ignored → Removes a stray semicolon that causes an if to be ignored [landed]
Attachment #538722 - Attachment description: Fix a leak in history menu construction → Fix a leak in history menu construction [landed]
Attachment #538723 - Attachment description: Prevent a divide-by-zero if tab overview mode is somehow empty → Prevent a divide-by-zero if tab overview mode is somehow empty [landed]
Attachment #538724 - Attachment description: Remove stray semicolons from #import/#include lines → Remove stray semicolons from #import/#include lines [landed]
Sigh, I forgot these changes were on my laptop when I re-imaged it. I'll have to hack up a new build at some point to re-create the changes.
Status: NEW → RESOLVED
Closed: 10 days ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: