[haiku-commits] haiku: hrev49724 - in src: tools/checkstyle add-ons/kernel/drivers/audio/hda add-ons/accelerants/intel_extreme

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 26 Oct 2015 18:36:34 +0100 (CET)

hrev49724 adds 3 changesets to branch 'master'
old head: d500273dd1ab2a30ef4c93c1c67326fa0b9198f2
new head: fe055bf34307fab6c0144d080a01072d701c38ef
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=fe055bf34307+%5Ed500273dd1ab

----------------------------------------------------------------------------

9e80618520b5: hda: PVS1619-21: "unsigned < 0" comparisons

* Probably harmless, the overflow on the other side was already checked.

[ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

4286d20b878d: intel_extreme: PVS 1765-6: only use bool in conditions

* Style fix, no functional changes.

[ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

fe055bf34307: change html output to confirm to XHTML Strict

Several errors in the html output caused WebPositive to not render
the file completely.

Signed-off-by: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>

Fixes #12387.

[ Jeroen Oortwijn <oortwijn@xxxxxxxxx> ]

----------------------------------------------------------------------------

4 files changed, 10 insertions(+), 11 deletions(-)
src/add-ons/accelerants/intel_extreme/overlay.cpp | 4 ++--
src/add-ons/kernel/drivers/audio/hda/hda_multi_audio.cpp | 4 ++--
src/tools/checkstyle/checkstyle.py | 4 ++--
src/tools/checkstyle/utils.py | 9 ++++-----

############################################################################

Commit: 9e80618520b547ff17140020b81fe579f9a7c4ac
URL: http://cgit.haiku-os.org/haiku/commit/?id=9e80618520b5
Author: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date: Sun Oct 25 09:58:32 2015 UTC

hda: PVS1619-21: "unsigned < 0" comparisons

* Probably harmless, the overflow on the other side was already checked.

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/drivers/audio/hda/hda_multi_audio.cpp
b/src/add-ons/kernel/drivers/audio/hda/hda_multi_audio.cpp
index eb7e358..7557d73 100644
--- a/src/add-ons/kernel/drivers/audio/hda/hda_multi_audio.cpp
+++ b/src/add-ons/kernel/drivers/audio/hda/hda_multi_audio.cpp
@@ -618,7 +618,7 @@ get_control_gain_mute(hda_audio_group* audioGroup,
static status_t
get_mix(hda_audio_group* audioGroup, multi_mix_value_info * mmvi)
{
- uint32 id;
+ int32 id;
hda_multi_mixer_control *control = NULL;
for (int32 i = 0; i < mmvi->item_count; i++) {
id = mmvi->values[i].id - MULTI_CONTROL_FIRSTID;
@@ -686,7 +686,7 @@ get_mix(hda_audio_group* audioGroup, multi_mix_value_info *
mmvi)
static status_t
set_mix(hda_audio_group* audioGroup, multi_mix_value_info * mmvi)
{
- uint32 id;
+ int32 id;
hda_multi_mixer_control *control = NULL;
for (int32 i = 0; i < mmvi->item_count; i++) {
id = mmvi->values[i].id - MULTI_CONTROL_FIRSTID;

############################################################################

Commit: 4286d20b878d4c001c725a1c6db50fb9a8dec114
URL: http://cgit.haiku-os.org/haiku/commit/?id=4286d20b878d
Author: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date: Sun Oct 25 10:41:28 2015 UTC

intel_extreme: PVS 1765-6: only use bool in conditions

* Style fix, no functional changes.

----------------------------------------------------------------------------

diff --git a/src/add-ons/accelerants/intel_extreme/overlay.cpp
b/src/add-ons/accelerants/intel_extreme/overlay.cpp
index 84c1677..2d4f41e 100644
--- a/src/add-ons/accelerants/intel_extreme/overlay.cpp
+++ b/src/add-ons/accelerants/intel_extreme/overlay.cpp
@@ -573,8 +573,8 @@ intel_configure_overlay(overlay_token overlayToken,
}

if (!gInfo->shared_info->overlay_active
- || memcmp(&gInfo->last_overlay_view, view, sizeof(overlay_view))
- || memcmp(&gInfo->last_overlay_frame, window,
sizeof(overlay_frame))) {
+ || memcmp(&gInfo->last_overlay_view, view, sizeof(overlay_view)
!= 0)
+ || memcmp(&gInfo->last_overlay_frame, window,
sizeof(overlay_frame)) != 0) {
// scaling has changed, program window and scaling factor

// clip the window to on screen bounds

############################################################################

Revision: hrev49724
Commit: fe055bf34307fab6c0144d080a01072d701c38ef
URL: http://cgit.haiku-os.org/haiku/commit/?id=fe055bf34307
Author: Jeroen Oortwijn <oortwijn@xxxxxxxxx>
Date: Mon Sep 21 22:35:15 2015 UTC
Committer: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Mon Oct 26 17:36:50 2015 UTC

Ticket: https://dev.haiku-os.org/ticket/12387

change html output to confirm to XHTML Strict

Several errors in the html output caused WebPositive to not render
the file completely.

Signed-off-by: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>

Fixes #12387.

----------------------------------------------------------------------------

diff --git a/src/tools/checkstyle/checkstyle.py
b/src/tools/checkstyle/checkstyle.py
index fb581ef..7b86341 100755
--- a/src/tools/checkstyle/checkstyle.py
+++ b/src/tools/checkstyle/checkstyle.py
@@ -58,9 +58,9 @@ cppRules["Operator at line end"] =
re.compile('([*=/+\-\|\&\?]|\&&|\|\|)(?=\n)')
cppRules["Missing space"] = re.compile('\){')
cppRules["Mixed tabs/spaces"] = re.compile('( \t]|\t )+')
cppRules["Malformed else"] = re.compile('}[ \t]*\n[ \t]*else')
-cppRules["Lines between functions > 2"] \
+cppRules["Lines between functions &gt; 2"] \
= re.compile('(?<=\n})([ \t]*\n){3,}(?=\n)')
-cppRules["Lines between functions < 2"] \
+cppRules["Lines between functions &lt; 2"] \
= re.compile('(?<=\n})([ \t]*\n){0,2}(?=.)')
cppRules["Windows Line Ending"] = re.compile('\r')
cppRules["Bad pointer/reference style"] \
diff --git a/src/tools/checkstyle/utils.py b/src/tools/checkstyle/utils.py
index 8b20575..8b587d4 100644
--- a/src/tools/checkstyle/utils.py
+++ b/src/tools/checkstyle/utils.py
@@ -27,9 +27,9 @@ def openHtml(fileList, outputFileName):
<style type="text/css">""" + cssStyle() + """</style>
</head>
<body>
- <p><b>File list:</b><br>""")
+ <p><b>File list:</b><br/>""")
for fileName in fileList:
- file.write(fileName + "<br>")
+ file.write(fileName + "<br/>")
file.write("</p>")
file.close()

@@ -37,7 +37,6 @@ def openHtml(fileList, outputFileName):
def closeHtml(outputFileName):
file = open(outputFileName, 'a')
file.write("""
- </pre>
</body>
</html>""")

@@ -67,14 +66,14 @@ def renderHtml(text, highlights, sourceFileName,
outputFileName):
file.write('<table><tr><td><pre class="code"><span class="linenumber">')
count = 1
for line in temp.split('\n'):
- file.write(str(count).rjust(4)+"<br>")
+ file.write(str(count).rjust(4)+"<br/>")
count += 1

file.write('</span></pre></td><td><pre class="code">')

for line in temp.split('\n'):
file.write('<span class="linehead"> </span>' + line.replace('\r', ' ')
\
- + '<br>')
+ + '<br/>')

file.write("</pre></td></tr></table>")



Other related posts:

  • » [haiku-commits] haiku: hrev49724 - in src: tools/checkstyle add-ons/kernel/drivers/audio/hda add-ons/accelerants/intel_extreme - pulkomandy