Merge lp://staging/~sforshee/powerd/fix-warnings into lp://staging/powerd

Proposed by Seth Forshee
Status: Needs review
Proposed branch: lp://staging/~sforshee/powerd/fix-warnings
Merge into: lp://staging/powerd
Diff against target: 44 lines (+6/-5)
3 files modified
src/display.c (+1/-1)
src/powerd-internal.h (+1/-1)
src/powerd-object.c (+4/-3)
To merge this branch: bzr merge lp://staging/~sforshee/powerd/fix-warnings
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Matt Fischer Pending
Review via email: mp+188613@code.staging.launchpad.net

Commit message

Fix build warnings

Description of the change

Fix build warnings

To post a comment you must log in.
98. By Seth Forshee

powerd-object: Fix tabs/space indentation in previous commit

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Matt Fischer (mfisch) wrote :

Looks good. Not sure I understand why the last change was needed but it works the same either way.

Revision history for this message
Seth Forshee (sforshee) wrote :

I don't understand why gcc complains about it, but that last change does eliminate a warning. I'm also pretty sure gcc wasn't complaining about it originally, and I don't know what changed to make it start.

Unmerged revisions

98. By Seth Forshee

powerd-object: Fix tabs/space indentation in previous commit

97. By Seth Forshee

powerd-object: Fix warning about format string

Something changed recently to cause gcc to start warning about
some code that it had no problem with previously:

 src/powerd-object.c: In function 'handle_ack_state_change':
 src/powerd-object.c:131:47: warning: format not a string literal and no format arguments [-Wformat-security]
                                                G_DBUS_ERROR_INVALID_ARGS, msg);
                                                ^

This is probably just gcc being pedantic. Change it to something
which is completely equivalent but does not generate warnings.

96. By Seth Forshee

display: Make power_mode argument to display_set_power_mode() const

This fixes a warning:

 powerd.cpp: In function 'gboolean {anonymous}::call_shutdown(gpointer)':
 powerd.cpp:127:40: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

The argument is read-only, so it really ought to be const anyway.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches