Re: [hatari-devel] 68030 and movem |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] 68030 and movem
- From: Uwe Seimet <Uwe.Seimet@xxxxxxxxx>
- Date: Mon, 18 Sep 2023 11:09:18 +0200
- Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1695028214; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=LxIgbO+UtCoZUqCqWizrf61qYnNvjVcUvbjVBHsgwkk=; b=EEmWYpt3lDp89Qmfm+DJTnNhEwqW+zwbkUhmAUrpWrYPVTZ5mhW63m1WhSrmTrvSqB K0tEZP1Su8m/AJDE/zyA2sXA9cE4AjKwxJIioyRdVhWLJXywJmfMlUWHzq75eJXK8QpT jmcK2piAgqKlqpOL8CGme7CMqiOefrfh4hdZ9I6TZ5giCWj7nBV70OiItAZCVTkcNLT9 L5P4wEupcWJNIBvOMr1uIC9494GYo9bMgkKlgD1ZAqHimlexkvBp38L0M2UclUTabFkf +3MoXtFT7o2MlIL/3g93pieR/O+lIEokroTfp9Yye+VOTMGPmDnKfZ4EqhCHBZy0ZhMo st6A==
- Arc-seal: i=1; a=rsa-sha256; t=1695028214; cv=none; d=strato.com; s=strato-dkim-0002; b=qnewGGX/VrbFRmuBh1Fm8gaxQ007pOr65n+YyMrgbS8lqXug2lr4HrCnj/vRto3fHe omKvr2xZnEF+reAfy+lgv1MeExKzEP/Zilv+i6hAce7B4MZrTyHgg+YaIow5JaiJ1xhM YSSV7xtnHghKYoKSpoRYpYr5tYvD2RYiXoJ+uSvivd6JS67FDo1wS/xNp6EHQlMBY1kE yZJxICck3Uq72S/+neOaNqhk6fHIePC1eoa4z9SQrRM/Ak5/YayiiNLHJ6haxy6pgGoX ctOgCnJW7PChMsQFRwBWmaO+Kq4vhg9pZY1Owi46BiYxluNb1OYgaeOAudNGeLaRCHha Qpvw==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1695028214; s=strato-dkim-0002; d=seimet.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=LxIgbO+UtCoZUqCqWizrf61qYnNvjVcUvbjVBHsgwkk=; b=kBVtdhZs+vzwPt6DNEzA4tpgTnwS7+EWQT8FA6JVeY4wBIHtrauJLfJfkftGUXD+8r 09gEooIAFhfJbqpcjuY+3ovlfwUZFXjUbui0DG0C5Guycm93q/wLwrjY7mJmMKWhvXhP VgYQ0ldgt1XC+NrUA6Eg9AOpIRQFcMz1E9E4kQ9ft5SvNF1Q7y5cL/gnt39pdvUh+9xH W6SEALUYjhklEDmx+bd/gE7nJ+gTY3xxYb+lQ3AKbEOQn9zHYUTLdofjexdXkUNfdDR1 O//9hZj1yWNRL4/qKZqFbLZHWo6BFm0KkKiT/ZIqatUEYodG0gRaDAfovX7YFwjrqOkv jMwA==
- Dkim-signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1695028214; s=strato-dkim-0003; d=seimet.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=LxIgbO+UtCoZUqCqWizrf61qYnNvjVcUvbjVBHsgwkk=; b=X3ygl+IrrK7kdiz60xtJ5HIm7JA0tsw3B+DYwhi6uTznhQo8LnAatotki4oyABNwdi Qmm+/5Kzc4lM1ttRUpCA==
Hi,
now that you mention code analysis I am wondering whether the Hatari team has
considered using SonarQube for this. I have been using SonarQube for ages,
with different projects and different progamming languages, including C++.
For open source projects SonarCloud
(https://www.sonarsource.com/products/sonarcloud/) offers free hosting, also
for C/C++, which is not free in the SonarQube Community Edition.
With SonarQube/SonarCloud you do not only find subtle bugs, but really
learn a lot about how to correctly and efficiently use the programming
language of your choice.
Best regards
Uwe
> Hi,
>
> I think it's considered good practice to always initialise variables
> these days. Getting into that habit prevents you from having to worry
> about uninitialised memory reads. We end up doing that at work to
> prevent static analysis tools from flagging it. Reducing the scope of
> variables can prevent the need for pointless initialisation as well,
> i.e. don't declare the variable until you actually have a value for
> it. The practice of declaring all variables at the top of a function
> dates back to ancient C compilers which mandated that.
>
> Cheers,
>
> Robin.
>
>
> On Mon, 18 Sept 2023 at 09:46, Andreas Grabher <andreas_g86@xxxxxxxxxx> wrote:
>
> > That is likely. But why do we add code just to optimize it away afterwards? At least it is bad for readability.
> >
>
>