summaryrefslogtreecommitdiffstats
path: root/text-utils/hexdump-parse.c
Commit message (Collapse)AuthorAgeFilesLines
* hexdump: fix potential null pointer dereference warningsSami Kerola2018-12-101-5/+7
| | | | | | | | | | | | | | | First three fixes on lines 133, 151, and 280 are cosmetic. Because there was unobvious null check compiler thought variable might be null, and warned when after pointer adjustment it was followed without null check. Perhaps this will not happen sometime in future when compiler is made more smart, meanwhile lets give better hints to avoid false positive. The last change addresses issue that is possible, at least in theory. text-utils/hexdump-parse.c:465:12: warning: potential null pointer dereference [-Wnull-dereference] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: fix ggc-7 fallthrough warningsSami Kerola2017-06-141-1/+1
| | | | | | | | | | | | | | | | | | | (Original patch and commit message edited by Rudi.) gcc-7 adds -Wimplicit-fallthrough=3 to our default flag -Wextra. This warning can be silenced by using comment /* fallthrough */ which is also recognized by other tools like coverity. There are also other valid comments (see man gcc-7) but we consolidate this style now. We could have also used __attribute__((fallthrough)) but the comment looks nice and does not need to be ifdef'ed for compatibility. Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Reference: https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ Reviewed-by: Ruediger Meier <ruediger.meier@ga-group.nl> Suggested-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: simplify if clauses [oclint]Sami Kerola2016-07-211-9/+6Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* hexdump: use 'll' format modifier instead of the non-standard 'q'.Natanael Copa2014-10-311-7/+9
| | | | | | | | | The printf(3) man page says about 'q': ("quad". 4.4BSD and Linux libc5 only. Don't use.) This is a synonym for ll. This fixes hexdump with musl libc. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* hexdump: Fix parse format of "byte count without repetition count"HUANG Wei2014-08-061-1/+1
|
* hexdump: use new colors APIKarel Zak2014-05-131-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: color unit may now be longer than the corresponding format unitOndrej Oprala2014-03-041-1/+15
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: add highlighting supportOndrej Oprala2014-02-101-0/+140
| | | | | | | | | [kzak@redhat.com: - fix coding style, - use xalloc in all code, - fix strtol usage] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: Create struct hexdump containing previously global variables.Ondrej Oprala2013-12-021-7/+7
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: add __attribute__ ((__noreturn__)) to bad*() functionsOndrej Oprala2013-12-021-24/+20Star
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rename struct _fs to struct hexdump_fs and remove its typedefOndrej Oprala2013-12-021-4/+4
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rename struct _fu to struct hexdump_fu and remove its typedefOndrej Oprala2013-12-021-8/+8
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: Rename struct _pr to struct hexdump_pr and remove it's typedefOndrej Oprala2013-12-021-5/+7
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rename rewrite to rewrite_rulesOndrej Oprala2013-12-021-1/+1
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rename add to add_fmtOndrej Oprala2013-12-021-2/+2
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: add the prefix 'hexdump-' to {conv,display,parse}.cOndrej Oprala2013-12-021-0/+494
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>