<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=811085" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/elextr">@elextr</a> which nightlies?  The ones on nightly.geany.org currently break because of a cppcheck issue, which I believe to be a cppcheck bug because it builds fine, and always did build fine.</p>
<p>Yes, adding parentheses around might be a workaround, but it still looks like a cppcheck bug to me, unless indeed gcc 8 also fails and that's not a new bug but a new restriction coming from C11 or something -- which I would find odd, but well.</p>
<p>I'll try to investigate what I can, but the code does look legitimate to me.  A reasonable alternative could be using <code>MAX()</code> as it's what the code actually does IIUC:</p>
<div class="highlight highlight-source-c"><pre>pointer_size = MAX(<span class="pl-k">sizeof</span>(<span class="pl-k">void</span> *), <span class="pl-k">sizeof</span> &memory_init);</pre></div>
<p>but I don't see any good reason to change that line apart from working around a cppcheck bug yet.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany-plugins/issues/794#issuecomment-442735573">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ8b00sXKgBM7Pxbo9M2Jf2Fu_zYcks5uz47jgaJpZM4Y5E1j">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ1i3KCb6WGxj4SkH0JNoH_LwqqcQks5uz47jgaJpZM4Y5E1j.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany-plugins","title":"geany/geany-plugins","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany-plugins"}},"updates":{"snippets":[{"icon":"PERSON","message":"@b4n in #794: @elextr which nightlies?  The ones on nightly.geany.org currently break because of a cppcheck issue, which I believe to be a cppcheck bug because it builds fine, and always did build fine.\r\n\r\nYes, adding parentheses around might be a workaround, but it still looks like a cppcheck bug to me, unless indeed gcc 8 also fails and that's not a new bug but a new restriction coming from C11 or something -- which I would find odd, but well.\r\n\r\nI'll try to investigate what I can, but the code does look legitimate to me.  A reasonable alternative could be using `MAX()` as it's what the code actually does IIUC:\r\n```c\r\npointer_size = MAX(sizeof(void *), sizeof \u0026memory_init);\r\n```\r\nbut I don't see any good reason to change that line apart from working around a cppcheck bug yet."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany-plugins/issues/794#issuecomment-442735573"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany-plugins/issues/794#issuecomment-442735573",
"url": "https://github.com/geany/geany-plugins/issues/794#issuecomment-442735573",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [geany/geany-plugins] Scope breaks nightly with gcc 8 (#794)",
"sections": [
{
"text": "",
"activityTitle": "**Colomban Wendling**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@b4n",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"geany/geany-plugins\",\n\"issueId\": 794,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"geany/geany-plugins\",\n\"issueId\": 794\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany-plugins/issues/794#issuecomment-442735573"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 417615203\n}"
}
],
"themeColor": "26292E"
}
]</script>