Kevin Backhouse
69d82ffe01
Defensive coding changes to avoid integer overflow in loop conditions.
2021-07-18 15:02:35 +01:00
Kevin Backhouse
2b84f4bd64
fix: zero initialize local variables. ( #1743 )
...
* Zero initialize local variables.
* Initialize xmpID_
2021-06-27 08:56:31 +02:00
Luis Díaz Más
f30022d73d
Fix issues detected with PVS-Studio + other little improvements ( #1689 )
...
* avoid re-declaration of constant variables
* Replace pthreads critical section with std::mutex
* ci - better naming
* cmake - increase minimum version to 3.11. Use project DESCRIPTION
* fix - do not treat string::find() return type as bool
* remove conditions that were always true
* remove condition that were always false
* Remove EXV_HAVE_GMTIME_R which is not used anymore
* pixelWidth_ was inherited from Exiv2::Image
The width & height variables in the TiffImage class need to be mutable
to be able to change their values on the getters pixelHeight() and
pixelWidth() ... Do not ask me why ...
* Remove superfluous if
* pvs:V766 item with identical key added already
* pvs:V730 not all members were initialized (time)
* pvs:V730 not all members are initialized
* pvs:v668 no point in testing pointer against null after new
* pvs:V1048 variable assigned the same value
* replace c-style dynamic vector with std one
* pvs:547 fakeData is always true
* Remove useless constructor in derived class
* pvs:V690 modern way to disable copy-ctor
* Replace malloc/free with new/delete. No need to check for null
* pvs:V1028 cast operands and not result
* Remove custom MIN/MAX functions
* pvs:V595 pointer used before verified against null
* pvs: index used before being checked
* pvs:V1028 possible overflow. Cast operands
* pvs:v575 potential null pointer passed to other functions
* pvs:V547 deal with always true/false expressions
* pvs:V560 part of conditional expressions always false or true
* pvs:V701 possible break in realloc -> move to std::vector
* Make some classes 'final'
* Replace sprintf with std::to_string()
* fix compilation on windows
2021-06-01 12:39:10 +02:00
Rosen Penev
2c57f214c5
clang-tidy: use nullptr
...
Found with modernize-use-nullptr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-26 08:31:45 +02:00
Rosen Penev
743da1a564
clang-tidy: use C++ casting
...
Found with google-readability-casting
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-20 07:29:02 +02:00
Rosen Penev
ff39473c18
clang-tidy: convert to static
...
Found with readability-convert-member-functions-to-static
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 14:45:20 +02:00
Rosen Penev
f9d394adf0
clang-tidy: run through performance checks
...
Found with performance*
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-18 14:30:08 +02:00
Rosen Penev
b8712188bb
clang-tidy: use auto
...
Found with modernize-use-auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-17 21:52:03 +02:00
Rosen Penev
20dfab8036
manual for range loop conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-17 10:30:42 +02:00
Rosen Penev
4aa5566cf6
clang-tidy: make several member functions const
...
Found with readability-make-member-function-const
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-15 08:42:04 +02:00
Rosen Penev
1b9b77c51f
clang-tidy: add ending namespace comments
...
Found with google-readability-namespace-comments
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-14 17:34:09 +02:00
Rosen Penev
674fdcd38b
clang-tidy: fix declartation names
...
Found with readability-inconsistent-declaration-parameter-name
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-12 09:26:51 +02:00
Rosen Penev
2e73aa9dc0
default con/destructors in headers
...
Helps to optimize trivially destructable stuff.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-12 09:10:36 +02:00
Rosen Penev
143a1fbbe2
clang-tidy: don't use string compare
...
Found with readability-string-compare
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-12 07:12:15 +02:00
Rosen Penev
8337462032
clang-tidy: use empty() instead of comparing size
...
Found with readability-container-size-empty
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-11 22:02:47 +02:00
Rosen Penev
15f0a600ed
clang-tidy: use default member init
...
Found with modernize-use-default-member-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-11 15:01:26 +02:00
Rosen Penev
5a9c29303e
clang-tidy: remove pointless static
...
Found with readability-static-definition-in-anonymous-namespace
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-09 17:44:37 +02:00
Rosen Penev
1dc1186760
clang-tidy: simplify boolean expressions
...
Found with readability-simplify-boolean-expr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-09 17:30:46 +02:00
Rosen Penev
8128716287
clang-tidy: use = default
...
Found with modernize-use-equals-default
Ran through git clang-format
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-09 15:18:50 +02:00
Luis Díaz Más
1b4577904b
Fix MSVC build
2021-05-03 17:41:55 +02:00
Rosen Penev
4ceb325c8f
clang-tidy: range for loop conversions
...
Found with modernize-loop-convert
Ran through git clang-format.
Also removed several questionable loops and replaced with simpler
algorithms.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-03 14:50:04 +02:00
Luis Díaz Más
f85f7f717a
Replace many of the iterators types with auto
2021-04-19 10:43:46 +02:00
Luis Díaz Más
de4d43d4d1
Fix warnings EXIV2_TEAM_EXTRA_WARNINGS
...
Most of the warnings fixed were:
- Hiding of local variables
- Hiding of globals
- Useless casts
- Conversions between float/double
2021-04-18 18:49:58 +02:00
Luis Díaz Más
0bbaa6eff3
cpp: Replace auto_ptr by unique_ptr
2021-04-15 06:56:11 +02:00
Robin Mills
d632988bbd
Massive code prolog cleanup.
2021-03-17 13:34:21 +00:00
clanmills
db9bec3e01
Restore -pC --binary to output everything. Test suite updated to suit.
2021-03-07 20:26:09 +00:00
clanmills
c59c53acf5
Trick to avoid msvc issue with final line of base64 data.
2021-03-06 21:18:58 +00:00
clanmills
0ad46453ed
With good fortune, bmffimage is ready for review.
2021-03-06 16:12:02 +00:00
clanmills
df68648dc3
refactored setModeAndPrintStructure() to respect class Task.binary_ when printing ICC profiles.
2021-03-05 17:06:52 +00:00
Peter Kovář
dcfe538a09
Revert "Add artist tag"
...
This reverts commit c46e800c0a .
2021-02-25 20:08:46 +01:00
Peter Kovář
c46e800c0a
Add artist tag
2021-02-25 19:40:18 +01:00
Robin Mills
3e78cac3f4
Merge pull request #1384 from Exiv2/fix_1380_binary
...
Disable exiv2 option --binary (0.27->maintenance)
2020-11-06 07:58:44 +00:00
Miloš Komarčević
1038e62a42
actions: simplify print summary using easyaccess
2020-11-05 12:10:36 +01:00
Miloš Komarčević
f6abec4432
exiv2 pr uses easyaccess API (co-authored with clanmills)
2020-11-04 19:19:40 +01:00
clanmills
bfee7abfc5
Disable exiv2 option --binary
2020-11-01 11:58:40 +00:00
clanmills
7515d85a09
Fix exiv2 option --binary to enable report of long binary values.
2020-05-12 10:58:29 +01:00
clanmills
43b06b6814
Don't allow binary into the output stream!
2020-05-11 18:29:35 +01:00
clanmills
92f2458229
fix_1180_date_separator
2020-04-25 14:31:26 +01:00
clanmills
7658d8aefd
fix_macOS_0.27
2020-03-28 08:08:28 +00:00
clanmills
db1be4ae8e
fix_1046_pt-GPSProcessingMethod
2020-03-22 20:56:38 +00:00
Luis Díaz Más
20a9e5affe
Fix format-overflow warnings by using bigger buffer
2019-10-09 12:37:38 +02:00
Luis Díaz Más
113136e134
Replace DEBUG with EXIV2_DEBUG_MESSAGES
...
Fixes #926
2019-07-12 11:14:35 +02:00
clanmills
db870755b9
fix #818 . Restore 0.25 behaviour of $ exiv2 -g image ... to apply grep to keys.
2019-05-11 07:35:26 +02:00
clanmills
c22a38cfb4
Fix for https://github.com/Exiv2/exiv2/issues/560 (eraseFamily() crashes in MSVC/Debug).
2018-11-30 14:18:17 +01:00
Robin Mills
1b136f0657
Revision to PR#557. Restored XmpData::erase() and added XmpData::eraseFamily(). Restored and augumented conversions.sh
2018-11-30 14:18:17 +01:00
Robin Mills
ac951622f4
Update DateTimeOriginal in NEF images
2018-11-06 19:28:11 +01:00
Luis Díaz Más
97379dec1d
Add braces around try-catch block. Apply clang-format to the function.
2018-10-11 13:40:03 +02:00
Luis Díaz Más
4216dcd0c2
Fix cppcheck issues: knownConditionTrueFalse
2018-10-11 13:40:03 +02:00
Luis Díaz Más
b118192f94
Fix cppcheck issues: redundantAssignment
2018-10-11 13:40:03 +02:00
Luis Díaz Más
1871ce5acd
Remove 'version.hpp' inclusion from places where it is not needed
...
By removing the inclusion from types.hpp we avoid lots of recompilation
of source files.
2018-09-14 07:43:21 +02:00