After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640447 - Fix gcc 4.6 warnings
Fix gcc 4.6 warnings
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-24 17:43 UTC by Dan Winship
Modified: 2011-01-24 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove set-but-unused variables, to appease gcc 4.6 (14.04 KB, patch)
2011-01-24 17:43 UTC, Dan Winship
committed Details | Review
shell-app-usage: remove a set-but-unused variable (963 bytes, patch)
2011-01-24 17:43 UTC, Dan Winship
reviewed Details | Review
shell-doc-system: fix %-escaping code in shell_doc_system_open() (1.13 KB, patch)
2011-01-24 17:44 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2011-01-24 17:43:54 UTC
See patches; the first is miscellaneous correct fixes, the second
preserves the current behavior, but that behavior might be a bug,
and the third fixes a bug.
Comment 1 Dan Winship 2011-01-24 17:43:56 UTC
Created attachment 179197 [details] [review]
Remove set-but-unused variables, to appease gcc 4.6
Comment 2 Dan Winship 2011-01-24 17:43:59 UTC
Created attachment 179198 [details] [review]
shell-app-usage: remove a set-but-unused variable

FIXME: is this right? should there be an "if (running)" or "if (!running)"?
Comment 3 Dan Winship 2011-01-24 17:44:01 UTC
Created attachment 179199 [details] [review]
shell-doc-system: fix %-escaping code in shell_doc_system_open()

It was escaping app_exec into app_exec_quoted, but then forgot about
it and went back to using app_exec.
Comment 4 Owen Taylor 2011-01-24 17:46:56 UTC
Review of attachment 179197 [details] [review]:

Assuming that none of the getters have mysterious side effects, and it compiles, it basically has to be right.
Comment 5 Owen Taylor 2011-01-24 17:55:34 UTC
Review of attachment 179198 [details] [review]:

adding an 'if (running)' seems most plausible there to me - it doesn't seem like we'd want to record an app as "seen" an extra time when it changes to the stopped state.

(The app usage code isn't actually used - and the algorithms it uses don't make a ton of sense to me. The original Mugshot code for application usage had a pretty simple and thought-through way of counting app usage, but that hasn't been preserved. So, in other words, who knows. I don't think adding an 'if (running)' would hurt anything.)
Comment 6 Owen Taylor 2011-01-24 17:56:46 UTC
Review of attachment 179199 [details] [review]:

Looks good
Comment 7 Dan Winship 2011-01-24 18:40:02 UTC
pushed with the suggested fix to shell-app-usage

Attachment 179197 [details] pushed as 13edecd - Remove set-but-unused variables, to appease gcc 4.6
Attachment 179199 [details] pushed as 6f07031 - shell-doc-system: fix %-escaping code in shell_doc_system_open()