Bladeren bron

Bugfixes/unread unused variables (#33)

* Update PIROptimizer.cpp

* Update PIRSession.cpp

* Update NFLLWE.cpp

* Update PIRReplyWriter.cpp

* Update PIRReplyGeneratorGMP.cpp

* Update PIRReplyGeneratorNFL_internal.cpp

* Update OptimService.cpp
Nicolas Amat 7 jaren geleden
bovenliggende
commit
c9ca19f67c

+ 0 - 1
apps/optim/PIROptimizer.cpp

@@ -1012,7 +1012,6 @@ void PIROptimizer::getNetworkInfos(FixedVars& fixedVars, boost::asio::ip::tcp::s
 {
   double start = 0, end=0, loop = 1;
   char *msg = (char *) malloc(MEGA_BYTE+4);
-  unsigned int read_size = 0;
   memset(msg, 1, MEGA_BYTE);
 
   size_t cmd = SPEED;

+ 1 - 2
apps/server/PIRSession.cpp

@@ -435,7 +435,6 @@ void PIRSession::downloadWorker()
           previous_elts = 0;
           for (unsigned int k = 0 ;  k < j ; k++) previous_elts += pirParam.n[k];
           std::cout <<"PIRSession: Query element " << i+1+previous_elts << "/" << total_elts << " received\r" << std::flush;
-          wasVerbose = true;
         }
 #endif
         
@@ -513,7 +512,7 @@ void PIRSession::uploadWorker()
   unsigned int byteSize = cryptoMethod->getPublicParameters().getCiphBitsizeFromRecLvl(pirParam.d)/GlobalConstant::kBitsPerByte;
   uint64_t totalbytesent=0;
   // Number of ciphertexts in the reply
-  unsigned long reply_nbr = generator->computeReplySizeInChunks(maxFileBytesize), i = 0;
+  unsigned long reply_nbr = generator->computeReplySizeInChunks(maxFileBytesize);
 #ifdef DEBUG
   cout << "PIRSession: Number of ciphertexts to send is " << reply_nbr << endl;
   cout << "PIRSession: maxFileBytesize is  " << maxFileBytesize << endl;

+ 0 - 1
crypto/NFLLWE.cpp

@@ -570,7 +570,6 @@ unsigned int NFLLWE::getCryptoParams(unsigned int k, std::set<std::string>& cryp
 {
   using namespace std;
   unsigned int p_size, params_nbr = 0;
-  string k_str  = to_string(k);
 
   for (unsigned int degree = kMinPolyDegree ; degree <= kMaxPolyDegree; degree <<= 1)
   {

+ 0 - 1
pir/replyExtraction/PIRReplyWriter.cpp

@@ -122,7 +122,6 @@ void PIRReplyWriter::writeFileSecurely(uint64_t element, DESC catalog, uint64_t
     while (leftChars != 0) 
     {
       uint64_t writtenchars = 0;
-      uint64_t current_bytesskipped = 0; 
 
       tmp = clearChunks.front();
       if (bytestoskip != 0)

+ 0 - 1
pir/replyGenerator/PIRReplyGeneratorGMP.cpp

@@ -301,7 +301,6 @@ PIRReplyGeneratorGMP::generateReply(mpz_t *queries,
 		int dimension,
 		mpz_t* result) 
 {
-  int affichages = 1;
   unsigned int data_size =  pirParam.n[dimension];
 	mpz_t replyTmp;
   int init_s = (*((PaillierPublicParameters*) &(cryptoMethod->getPublicParameters()))).getPubKey()->getinit_s();

+ 1 - 2
pir/replyGenerator/PIRReplyGeneratorNFL_internal.cpp

@@ -95,7 +95,7 @@ void PIRReplyGeneratorNFL_internal::importDataNFL(uint64_t offset, uint64_t byte
   uint64_t lastindex = 0;
 #endif
   // For global time measurement
-  double start = omp_get_wtime();double now,delta;
+  double start = omp_get_wtime();
 
   int nbruns=ceil((double)nbFiles/pirParam.alpha);
   
@@ -167,7 +167,6 @@ imported_database_t PIRReplyGeneratorNFL_internal::generateReplyGeneric(bool kee
 //  std::ifstream *is = dbhandler->openStream(0,0);
   const uint64_t nbFiles = dbhandler->getNbStream();
   const unsigned int polysize = cryptoMethod->getpolyDegree()*cryptoMethod->getnbModuli();
-  const unsigned int jumpcipher = 2*polysize / sizeof(uint64_t);
 	currentMaxNbPolys=0;
 	lwe_in_data *input = new lwe_in_data[iterations];
   lwe_cipher *resul = new lwe_cipher[iterations];