Commit Graph

34 Commits

Author SHA1 Message Date
Austin Schuh d30404868f
ARM and -Wextra fixups (#19141)
* Make generated code compile with -Wunused-parameters

-Wunused-parameters is turned on by -Werror -Wextra.  gRPC code
generation creates header files with unused parameters.  So let's modify
the generator to not generate code which will make -Wunused-parameters
unhappy.

* Fix unsigned vs signed comparisons and 32 bit string formats

Fix unsigned vs signed comparison warnings.

For 64 bit numbers printed in gRPC, the string formats assume that you
are running on a 64 bit machine.  Use inttypes.h to make it portable.
Also, use size_t format strings for the same reason.

* Fix unaligned memory access

cost_entry_ptr has no alignment guarentees that ubsan can find.  So it
fails the test with an alignment problem.  Use memcopy to read the data
from the pointer to fix this.

* Fix undefined behavior with memcpy and memcmp

Passing in a 0 length piece of data and a null pointer is undefined
behavior.  If the length is 0, don't pass it in.  This fixes ubsan
failures.

* Clang-format

* Automated change: Fix sanity tests
2021-09-27 04:54:05 -07:00
Craig Tiller ea389c00c2
Adjust include order per style guide (#27175)
Introduce clang-format configuration to sort includes closer to our rules.
2021-09-08 12:14:44 -07:00
donnadionne 1835f00ef1
Revert "Revert "Made grpc_core::Mutex compatible to absl::Mutex" (#25537)" (#25549)
This reverts commit 8e268dcec8.
2021-02-24 16:49:34 -08:00
donnadionne 8e268dcec8
Revert "Made grpc_core::Mutex compatible to absl::Mutex" (#25537)
* Revert "Made grpc_core::Mutex compatible to absl::Mutex"

This reverts commit 0b53341328.

* Revert "Added thread annotation (#25486)"

This reverts commit 9d897cb1a5.

* Revert "Fix a race in resolve_address and resolve_address_posix tests"

This reverts commit 6d8e7d3819.

* Restore 25398

* restore 25398
2021-02-24 10:32:49 -08:00
Esun Kim 0b53341328 Made grpc_core::Mutex compatible to absl::Mutex 2021-02-10 09:56:55 -08:00
Esun Kim 6dc1748f6c
Revert "Made grpc_core::Mutex compatible to absl::Mutex" 2021-02-10 07:53:02 -08:00
Esun Kim 6a1518bd22 Made grpc_core::Mutex compatible to absl::Mutex 2021-02-08 16:15:53 -08:00
Esun Kim ca92d3465a Fix format warnings 2021-01-27 11:16:57 -08:00
Esun Kim 9bd7c4917a Fix unused-parameter warning 2021-01-19 18:18:09 -08:00
Mark D. Roth 27e1c1c56d clang-tidy: enable google-readability-braces-around-statements 2020-11-06 13:41:44 -08:00
Esun Kim 84df61b31a
Merge pull request #24453 from veblush/tidy-modernize-make-unique
[Clang-Tidy] Enable modernize-make-unique
2020-10-16 16:35:08 -07:00
Esun Kim e7434d385e Fix by tidy-modernize-use-override 2020-10-16 14:01:06 -07:00
Esun Kim 6ae8463500 Fix by modernize-make-unique 2020-10-16 13:30:56 -07:00
Esun Kim ece76ee1e8 Fix code by readability-container-size-empty 2020-10-16 09:48:20 -07:00
Esun Kim c08f33c437 Fix clang-tidy errors 2020-10-15 16:07:25 -07:00
Karthik Ravi Shankar e549843885 Move remaining classes to grpc from grpc_impl 2020-10-06 13:15:51 -07:00
Karthik Ravi Shankar 69f8d308cb Move LoadReportingServiceServerBuilderOption from ::grpc_impl to ::grpc
Reverts: https://github.com/grpc/grpc/pull/18419/files
2020-07-13 14:50:33 -07:00
Esun Kim 165ee5007a Replaced grpc::string with std::string 2020-06-29 17:56:36 -07:00
Vijay Pai b7239efc82 Weaken reinterpret_cast to static_cast 2020-01-25 10:49:28 -08:00
easy 6bca0f04a3 Use opencensus::tags::TagKey.
opencensus::stats::TagKey is deprecated.
2019-08-16 19:14:09 +10:00
Soheil Hassas Yeganeh 2b9448a71c Revert "Revert "Introduce C++ wrappers for gpr_mu and gpr_cv.""
This reverts commit d09c9f8e20.
2019-04-17 14:35:29 -04:00
Alexander Polcyn d09c9f8e20 Revert "Introduce C++ wrappers for gpr_mu and gpr_cv."
This reverts commit a26c09dd25.
2019-04-11 16:52:54 -07:00
Soheil Hassas Yeganeh a26c09dd25 Introduce C++ wrappers for gpr_mu and gpr_cv.
Introduce RAII wrappers in the grpc::internal and grpc_core
namespaces, and use them in place of std::mutex and
std::condition_variable.

Note that, since std::mutex is also used by the public
C++ headers we cannot introduce these wrappers in grpc_core.

Also, note that in grpcpp we cannot use gRPC core and vice versa.
So we had to duplicate the code, once using core_codegen_interface
and once using direct calls.
2019-04-08 18:27:07 -04:00
Karthik Ravi Shankar 150935aeef Merge branch 'master' into grpc_namespace_server_load_reporting 2019-04-01 13:50:30 -07:00
Karthik Ravi Shankar fc50caf725 Fix clang format issues 2019-03-27 15:03:20 -07:00
Karthik Ravi Shankar 577ddfb1a1 Move ServerInitializer to grpc_impl namespace from grpc 2019-03-27 12:28:35 -07:00
Karthik Ravi Shankar e9593285a8 Move LoadReportingServiceServerBuilderOption from grpc to grpc_impl 2019-03-18 13:20:42 -07:00
Vijay Pai 301ed88a43 Avoid unused result warning 2019-02-20 21:39:02 -08:00
Kumar Akshay 564be999de Fix warning
Fix clang format
2019-01-26 18:39:23 +05:30
Junhao Li 5cb99c9592
fix format 2018-08-09 00:51:17 -04:00
Junhao Li b9decfb35d
include cmath to fix gcc8 compilation error
This fix resolves the following compilation error on GCC8.1.1:

ERROR: /home/junhao/tools/grpc/BUILD:1350:1: C++ compilation of rule '//:grpcpp_server_load_reporting' failed (Exit 1)
src/cpp/server/load_reporter/util.cc:31:12: error: no member named 'isnormal' in namespace 'std'
  if (std::isnormal(cost_value)) {
      ~~~~~^
1 error generated.
2018-08-08 14:31:52 -07:00
Juanli Shen be40b0d3a8 Add server load reporting service 2018-07-13 19:52:59 -07:00
Juanli Shen 291bbc7014 Add load reporter 2018-06-21 13:21:02 -07:00
Juanli Shen a0aab7ebcc Add load data store 2018-05-01 10:46:44 -07:00