Skip to content

Commit 78557b6

Browse files
committed
avoid shadowing warning
Signed-off-by: Rosen Penev <[email protected]>
1 parent 479d5e1 commit 78557b6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

include/exiv2/quicktimevideo.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class EXIV2API QuickTimeVideo : public Image {
139139
in the respective XMP container.
140140
@param size Size of the data block used to store Tag Information.
141141
*/
142-
void userDataDecoder(size_t size, size_t recursion_depth);
142+
void userDataDecoder(size_t outer_size, size_t recursion_depth);
143143
/*!
144144
@brief Interpret Preview Tag, and save it
145145
in the respective XMP container.

src/http.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,17 @@ int Exiv2::http(Exiv2::Dictionary& request, Exiv2::Dictionary& response, std::st
199199
struct addrinfo hints = {};
200200
hints.ai_family = AF_INET;
201201
hints.ai_socktype = SOCK_STREAM;
202-
struct addrinfo* result;
202+
struct addrinfo* r;
203203

204-
int res = getaddrinfo(servername_p, port_p, &hints, &result);
204+
int res = getaddrinfo(servername_p, port_p, &hints, &r);
205205
if (res != 0) {
206206
closesocket(sockfd);
207207
return error(errors, "no such host: %s", gai_strerror(res));
208208
}
209209

210-
std::memcpy(&serv_addr, result->ai_addr, serv_len);
210+
std::memcpy(&serv_addr, r->ai_addr, serv_len);
211211

212-
freeaddrinfo(result);
212+
freeaddrinfo(r);
213213
}
214214

215215
makeNonBlocking(sockfd);

src/quicktimevideo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ void QuickTimeVideo::CameraTagsDecoder(size_t size) {
842842
io_->seek(cur_pos + size, BasicIo::beg);
843843
} // QuickTimeVideo::CameraTagsDecoder
844844

845-
void QuickTimeVideo::userDataDecoder(size_t size, size_t recursion_depth) {
845+
void QuickTimeVideo::userDataDecoder(size_t outer_size, size_t recursion_depth) {
846846
enforce(recursion_depth < max_recursion_depth_, Exiv2::ErrorCode::kerCorruptedMetadata);
847847
size_t cur_pos = io_->tell();
848848
const TagVocabulary* td;
@@ -851,7 +851,7 @@ void QuickTimeVideo::userDataDecoder(size_t size, size_t recursion_depth) {
851851

852852
const long bufMinSize = 100;
853853
DataBuf buf(bufMinSize);
854-
size_t size_internal = size;
854+
size_t size_internal = outer_size;
855855
std::memset(buf.data(), 0x0, buf.size());
856856

857857
while ((size_internal / 4 != 0) && (size_internal > 0)) {
@@ -908,7 +908,7 @@ void QuickTimeVideo::userDataDecoder(size_t size, size_t recursion_depth) {
908908
tagDecoder(buf, size - 8, recursion_depth + 1);
909909
}
910910

911-
io_->seek(cur_pos + size, BasicIo::beg);
911+
io_->seek(cur_pos + outer_size, BasicIo::beg);
912912
} // QuickTimeVideo::userDataDecoder
913913

914914
void QuickTimeVideo::NikonTagsDecoder(size_t size) {

0 commit comments

Comments
 (0)