<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/tests/fs-tests, branch v2.1.2</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2020-02-09T21:13:18+00:00</updated>
<entry>
<title>mtd-utils: Fix potential negative arguments passed to close(2)</title>
<updated>2020-02-09T21:13:18+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-01-24T22:01:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=b636250e211198210ab996671bccc2983300c6f5'/>
<id>urn:sha1:b636250e211198210ab996671bccc2983300c6f5</id>
<content type='text'>
Many tools open a file descriptor, close it a the end and have some
form of error path in between that jumps to the end.

In some cases, if opening the file fails the error path is taken and
the utility ends up closing one or more invalid file descriptors. It's
technically not a real issue but something that pretty much any static
analysis tool barks at.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fs-tests: don't leak temporary buffers</title>
<updated>2019-11-10T14:30:04+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-11-10T14:16:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=57b6d16548b876823da07022470077b92bb138a3'/>
<id>urn:sha1:57b6d16548b876823da07022470077b92bb138a3</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: Instead of doing preprocessor magic, just output off_t as long long</title>
<updated>2018-10-02T12:00:28+00:00</updated>
<author>
<name>Thorsten Glaser</name>
<email>tg@mirbsd.org</email>
</author>
<published>2018-09-20T23:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=64667fe63ba9dd78adb9c4abf04bc3e4e25a0fd7'/>
<id>urn:sha1:64667fe63ba9dd78adb9c4abf04bc3e4e25a0fd7</id>
<content type='text'>
Fix warnings abot PRIdoff_t in libmtd.c, in mtd_read (and mtd_write):

In file included from ../git/lib/libmtd.c:40:0:
../git/lib/libmtd.c: In function 'mtd_read':
../git/include/common.h:110:18: warning: format '%ld' expects argument of
 type 'long int', but argument 5 has type 'off_t {aka long long int}'
 [-Wformat=]

../git/include/common.h:120:2: note: in expansion of macro 'errmsg'
  errmsg(fmt, ##__VA_ARGS__);                                         \
  ^~~~~~
../git/lib/libmtd.c:1082:10: note: in expansion of macro 'sys_errmsg'
   return sys_errmsg("cannot seek mtd%d to offset %"PRIdoff_t,
          ^~~~~~~~~~

/usr/lib/klibc/include/inttypes.h:28:17: note: format string is defined here
 #define PRId32 "d"

Signed-off-by: Thorsten Glaser &lt;tg@mirbsd.org&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Enable further warning flags, address new warnings</title>
<updated>2017-11-03T18:41:32+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-11-01T22:08:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=03dafe3202372e557f7125dc8155cb1d564d1f5e'/>
<id>urn:sha1:03dafe3202372e557f7125dc8155cb1d564d1f5e</id>
<content type='text'>
mtd_debug: Remove a duplicate if case. MTD_CAP_NANDFLASH has only one
flag set (MTD_WRITEABLE). Directly below, we had a check for
MTD_WRITEABLE in the else branch which can't possible ever have
triggered. Checking for MTD_WRITEABLE in addition to the CAP constants
was probably not intended anyway, given the check for the individual
flags if all else fails.

integck: We already established that "r" is less than the number of
elements in the list, so the loop condition doesn't need to check
if w is NULL in addition. At least this way, the compiler "gets"
that w cannot be NULL below and doesn't issue warnings.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Mark or fix switch cases that fall through</title>
<updated>2017-11-02T00:34:18+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-09-21T09:15:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=475bf707b958f37844534b7b45c905521c7401a2'/>
<id>urn:sha1:475bf707b958f37844534b7b45c905521c7401a2</id>
<content type='text'>
Now that C++17 introduced a special fallthrough keyword for
explicitly tagging switch cases that are supposed to fall
through, newer gcc versions also implement a feature request
from 2002 to warn about maybe unwanted fall-throughs in switch
cases in other languages (like C).

For C code, we can either add a gcc specific attribute at the
end of the switch case, or use a special comment that gcc checks
for, indicating that the fall-through behaviour is indeed
intended.

This patch adds a "/* fall-through */" comment at the end of
various case blocks to silence gcc warnings and in some cases
a break, where fall-through was probably not intended.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Add const modifier to read only strings and string constants</title>
<updated>2017-06-28T09:43:03+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-06-22T12:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f8bc7d94761f6153be606328183fac6766202914'/>
<id>urn:sha1:f8bc7d94761f6153be606328183fac6766202914</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Silence warnings about unused arguments</title>
<updated>2017-06-28T09:43:03+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-06-22T11:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a7c8cb36d1fb972082ef4f0039300d051ade2de9'/>
<id>urn:sha1:a7c8cb36d1fb972082ef4f0039300d051ade2de9</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Eliminate warnings about missing prototypes</title>
<updated>2017-06-28T08:27:31+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-06-22T11:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ca517e8b320c7a31c3a147fb1212ddb33cabd919'/>
<id>urn:sha1:ca517e8b320c7a31c3a147fb1212ddb33cabd919</id>
<content type='text'>
This patch eliminates warnings generated by the -Wmissing-prototypes
option. With this flag set, we are now forced to have prototypes for
all global, exported functions, that have to be made visible to the
definitions and we are forced to mark all local functions as static.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Use autoconf header detection correctly for libmissing</title>
<updated>2017-06-28T08:27:19+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-06-21T08:27:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=022ce62b9f6706749feed3939335e46bb0146978'/>
<id>urn:sha1:022ce62b9f6706749feed3939335e46bb0146978</id>
<content type='text'>
AC_CHECK_HEADERS already makes sure our config header contains a
HAVE_$FOO_H macro if a header was found. There is no need to
awkwardly set our own Automake conditionals and check for it all
over the place in the Automake files.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi-utils: Return error code if command line option is unknown</title>
<updated>2017-06-14T09:00:30+00:00</updated>
<author>
<name>Daniel Wagner</name>
<email>daniel.wagner@siemens.com</email>
</author>
<published>2017-06-12T10:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=76e27a79eddb6279bbbc0ec840d66b753a9ba0f3'/>
<id>urn:sha1:76e27a79eddb6279bbbc0ec840d66b753a9ba0f3</id>
<content type='text'>
The tools in question will quit with an exit code 0 if the command
line option was not recognized. By returning an error code a calling
script has the possibility to distinguish between a real success and
an invalid invocation.

We need to return -1 instead of EXIT_FAILURE to be consistent with the
other exit code places.

Signed-off-by: Daniel Wagner &lt;daniel.wagner@siemens.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
