commit | fb4ce0b029cb52278b8d835c71ce54743226c239 | [log] [tgz] |
---|---|---|
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | Sun Dec 31 16:38:40 2023 +0700 |
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | Sun Dec 31 16:59:40 2023 +0700 |
tree | a25d112d05f09d00231513815c30de0956b82ea1 | |
parent | 0f59cebf081edc20d8a7b19cb799810446fc2ab3 [diff] |
utils: fix -Wsign-compare in definition of OSMO_STRBUF_CHAR_COUNT We're seeing tons of -Wsign-compare warnings since I merged 0f59cebf: include/osmocom/core/utils.h: In function 'size_t _osmo_strbuf_char_count(const osmo_strbuf*)': include/osmocom/core/utils.h:24:29: error: comparison of integer expressions of different signedness: 'long int' and 'long unsigned int' [-Werror=sign-compare] 24 | #define OSMO_MIN(a, b) ((a) >= (b) ? (b) : (a)) | ~~~~^~~~~~ include/osmocom/core/utils.h:309:16: note: in expansion of macro 'OSMO_MIN' 309 | return OSMO_MIN(sb->pos - sb->buf, sb->len - 1); | ^~~~~~~~ Interestingly enough, this -Wsign-compare problem has always been the case, even before commit 0f59cebf. And somehow this did not show up when building libosmocore.git, but only when building C++ projects (osmo-pcu and osmo-trx). Perhaps it has something to do with how g++ compiles extern "C" code. Change-Id: I8e396459409e4260b8715f9e890e8972d4609a31 Fixes: 0f59cebf "utils: improve readability of OSMO_STRBUF_CHAR_COUNT"
This repository contains a set of C-language libraries that form the core infrastructure of many Osmocom Open Source Mobile Communications projects.
Historically, a lot of this code was developed as part of the OpenBSC project, but which are of a more generic nature and thus useful to (at least) other programs that we develop in the sphere of Free Software / Open Source mobile communications.
There is no clear scope of it. We simply move all shared code between the various Osmocom projects in this library to avoid code duplication.
The libosmocore.git repository build multiple libraries:
The official homepage of the project is https://osmocom.org/projects/libosmocore/wiki/Libosmocore
You can clone from the official libosmocore.git repository using
git clone https://gitea.osmocom.org/osmocom/libosmocore
There is a web interface at https://gitea.osmocom.org/osmocom/libosmocore
Doxygen-generated API documentation is generated during the build process, but also available online for each of the sub-libraries at https://ftp.osmocom.org/api/latest/libosmocore/
Discussions related to libosmocore are happening on the openbsc@lists.osmocom.org mailing list, please see https://lists.osmocom.org/mailman/listinfo/openbsc for subscription options and the list archive.
Please observe the Osmocom Mailing List Rules when posting.
Our coding standards are described at https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
We us a gerrit based patch submission/review process for managing contributions. Please see https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for more details
The current patch queue for libosmocore can be seen at https://gerrit.osmocom.org/#/q/project:libosmocore+status:open