]> git.sesse.net Git - plocate/commitdiff
Remove some unneeded __attribute__((unused)).
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 17 Oct 2020 12:37:25 +0000 (14:37 +0200)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 17 Oct 2020 12:37:25 +0000 (14:37 +0200)
plocate-build.cpp
plocate.cpp

index f08afd063d651e82ea9666f6547bbccc631d0a7d..67586d228718a1b5e0e232eaae849a9e0aa17b8d 100644 (file)
@@ -474,7 +474,7 @@ unique_ptr<Trigram[]> create_hashtable(Corpus &corpus, const vector<uint32_t> &a
 
 void do_build(const char *infile, const char *outfile, int block_size)
 {
-       steady_clock::time_point start __attribute__((unused)) = steady_clock::now();
+       steady_clock::time_point start = steady_clock::now();
 
        FILE *infp = fopen(infile, "rb");
        if (infp == nullptr) {
@@ -622,7 +622,7 @@ void do_build(const char *infile, const char *outfile, int block_size)
        fwrite(&hdr, sizeof(hdr), 1, outfp);
        fclose(outfp);
 
-       size_t total_bytes __attribute__((unused)) = (bytes_for_hashtable + bytes_for_posting_lists + bytes_for_filename_index + bytes_for_filenames);
+       size_t total_bytes = (bytes_for_hashtable + bytes_for_posting_lists + bytes_for_filename_index + bytes_for_filenames);
 
        dprintf("Block size:     %7d files\n", block_size);
        dprintf("Dictionary:     %'7.1f MB\n", dictionary.size() / 1048576.0);
index c2bb17ca1452e5b63468c7e45ae5a305db1dc059..c06a28bf2dd24a233c7d8a2726822bc23cd6d8cc 100644 (file)
@@ -601,7 +601,7 @@ void do_search_file(const vector<Needle> &needles, const char *filename)
                                if (done)
                                        return;
 
-                               uint32_t trgm __attribute__((unused)) = trgmptr.trgm;
+                               uint32_t trgm = trgmptr.trgm;
                                const unsigned char *pldata = reinterpret_cast<const unsigned char *>(s.data());
                                size_t num = trgmptr.num_docids;
                                decoded.resize(num);