Merge lp:~mc-return/compiz/compiz.merge-performance-do-not-assign-values-that-are-never-used into lp:compiz/0.9.9
Status: | Rejected |
---|---|
Rejected by: | Daniel van Vugt |
Proposed branch: | lp:~mc-return/compiz/compiz.merge-performance-do-not-assign-values-that-are-never-used |
Merge into: | lp:compiz/0.9.9 |
Diff against target: |
406 lines (+35/-38) 24 files modified
compizconfig/gconf/src/gconf.c (+1/-1) compizconfig/gsettings/gsettings_backend_shared/ccs_gsettings_backend.c (+1/-1) compizconfig/gsettings/gsettings_backend_shared/gsettings_util.c (+7/-7) compizconfig/integration/gnome/src/ccs_gnome_integration.c (+1/-1) compizconfig/libcompizconfig/backend/src/ini.c (+2/-2) compizconfig/libcompizconfig/src/compiz.cpp (+2/-2) compizconfig/libcompizconfig/src/config.c (+1/-1) compizconfig/libcompizconfig/src/main.c (+4/-4) gtk/window-decorator/events.c (+1/-1) gtk/window-decorator/gwd-settings-notified.c (+1/-1) gtk/window-decorator/gwd-settings-storage-gconf.c (+1/-1) gtk/window-decorator/gwd-settings-storage-gsettings.c (+1/-1) gtk/window-decorator/gwd-settings-xproperty-storage.c (+1/-1) kde/window-decorator-kde4/switcher.cpp (+1/-1) kde/window-decorator-kde4/window.cpp (+1/-2) plugins/bicubic/src/bicubic.cpp (+1/-1) plugins/cube/src/cube.cpp (+1/-1) plugins/dbus/src/dbus.cpp (+1/-1) plugins/decor/src/decor.cpp (+2/-2) plugins/grid/src/grid.cpp (+1/-1) plugins/opengl/src/texture.cpp (+1/-1) plugins/resize/src/logic/src/resize-logic.cpp (+0/-2) plugins/workarounds/src/workarounds.cpp (+1/-1) src/screen.cpp (+1/-1) |
To merge this branch: | bzr merge lp:~mc-return/compiz/compiz.merge-performance-do-not-assign-values-that-are-never-used |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Disapprove | ||
Sam Spilsbury | Needs Information | ||
Review via email: mp+135150@code.launchpad.net |
Commit message
Minor Performance Optimization:
Do not assign values to variables, if those variables are assigned a new value, before the old one was ever used.
Unmerged revisions
- 3511. By MC Return
-
Do not assign 0 to int i, because this value is never used
- 3510. By MC Return
-
Do not assign 0 to int i, because this value is never used
- 3509. By MC Return
-
Do not assign output to the ints lco, tco, bco and rco, because this value is never used afterwards
- 3508. By MC Return
-
Do not assign NULL to EGLImageKHR eglImage, because this value is not used afterwards
- 3507. By MC Return
-
Do not assign 0 to CompWindow *cw, because this value is not used afterwards
- 3506. By MC Return
-
Do not assign 0 to XRectangle *shapeRects, because this value is not used afterwards
- 3505. By MC Return
-
Do not assign 0 to Xrectangle *shapeRects, because this value is not used afterwards
- 3504. By MC Return
-
Do not assign NULL to CompOption *option, because this value is not used afterwards
- 3503. By MC Return
-
Do not assign 0 to int output, because this value never gets used
- 3502. By MC Return
-
Do not assign 0 to int unit, because this value is never used
IMO its good defensive coding practise to initialize every variable before use because it insures against further changes using uninitialized variables.
I'd like to hear the converse argument though. I think the compiler will just optimize out any redundancy really.