Skip to content

Commit 3242ef3

Browse files
authored
Merge pull request #46260 from iarspider/iarspider-llvman-gen
[LLVM Analyzer][Gen] Cleanup dead assignments reported by llvm analyzer
2 parents 1b7e817 + 49d4b30 commit 3242ef3

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

GeneratorInterface/ExhumeInterface/src/ExhumeHadronizer.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ namespace gen {
211211
(static_cast<Exhume::DiPhoton*>(exhumeProcess_))->SetThetaMin(thetaMin);
212212
sigID = 400;
213213
} else {
214-
sigID = -1;
215214
throw edm::Exception(edm::errors::Configuration, "ExhumeError") << " No valid Exhume Process";
216215
}
217216

GeneratorInterface/GenFilters/plugins/PythiaAllDauVFilter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ bool PythiaAllDauVFilter::filter(edm::StreamID, edm::Event& iEvent, const edm::E
8989
int OK(1);
9090
vector<int> vparticles;
9191
vector<bool> foundDaughter(dauIDs.size(), false);
92-
auto dauCollection = &dauIDs;
92+
const std::vector<int>* dauCollection = nullptr;
9393

9494
HepMC::GenEvent* myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));
9595

GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class ExternalLHEProducer : public edm::one::EDProducer<edm::BeginRunProducer, e
110110
edm::EDPutTokenT<LHERunInfoProduct> beginRunPutToken_;
111111
class FileCloseSentry {
112112
public:
113-
explicit FileCloseSentry(int fd) : fd_(fd){};
113+
explicit FileCloseSentry(int fd) : fd_(fd) {};
114114

115115
~FileCloseSentry() { close(fd_); }
116116

@@ -505,7 +505,6 @@ void ExternalLHEProducer::executeScript(std::vector<std::string> const& args, in
505505
close(filedes[1]);
506506
// If the exec succeeds, the read will fail.
507507
while (((rc2 = read(filedes[0], &rc, sizeof(int))) == -1) && (errno == EINTR)) {
508-
rc2 = 0;
509508
}
510509
if ((rc2 == sizeof(int)) && rc) {
511510
throw cms::Exception("ExternalLHEProducer")

GeneratorInterface/ReggeGribovPartonMCInterface/src/read.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <cstring>
66

77
int main(int numArgs, const char *args[]) {
8-
int res;
8+
// int res;
99

1010
if (numArgs != 2) {
1111
//PrintHelp(rs);
@@ -21,10 +21,10 @@ int main(int numArgs, const char *args[]) {
2121
}
2222

2323
LzmaFile lzma;
24-
res = lzma.Open(args[1]);
25-
res = lzma.DecodeAll();
26-
res = lzma.Close();
27-
24+
/*res =*/lzma.Open(args[1]);
25+
/*res =*/lzma.DecodeAll();
26+
/*res =*/lzma.Close();
27+
/*
2828
if (res != SZ_OK) {
2929
if (res == SZ_ERROR_MEM) {
3030
return 0; //PrintError(rs, kCantAllocateMessage);
@@ -37,5 +37,6 @@ int main(int numArgs, const char *args[]) {
3737
}
3838
return 0; //PrintErrorNumber(rs, res);
3939
}
40+
*/
4041
return 0;
4142
}

GeneratorInterface/SherpaInterface/src/SherpackUtilities.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ namespace spu {
417417
printf("%c", buff[ll]);
418418
}
419419
printf("\n");
420-
bytes_read = fread(buff, 1, 512, a);
421420
for (int ll = 0; ll < 512; ll++) {
422421
printf("%c", buff[ll]);
423422
}
@@ -431,7 +430,6 @@ namespace spu {
431430
}
432431
//~ printf("NEW LinkNAME: %s\n",newlonglinkname);
433432
} else if (buff[156] == 'L') {
434-
bytes_read = fread(buff, 1, 512, a);
435433
for (int k = 0; k < filesize; k++) {
436434
newlongpathname[k] = buff[k];
437435
}

0 commit comments

Comments
 (0)