Changeset f4a42661 in mainline


Ignore:
Timestamp:
2023-10-22T14:04:49Z (14 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
590cb6d2
Parents:
b2cbc0b (diff), c63c2bb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge fixes to issues found while updating toolchain

Files:
13 edited

Legend:

Unmodified
Added
Removed
  • meson.build

    rb2cbc0b rf4a42661  
    3636    [ 'c', 'cpp' ],
    3737    default_options : ['buildtype=plain', 'c_std=gnu11', 'cpp_std=c++17', 'warning_level=2', 'werror=false', 'b_staticpic=false', 'prefix=/' ],
    38     meson_version: '>=0.50.1',
     38    meson_version: '>=0.55.0',
    3939)
    4040
  • meson/part/compiler_args/meson.build

    rb2cbc0b rf4a42661  
    6060        '-Wall',
    6161        '-Wextra',
    62         '-Werror-implicit-function-declaration',
    6362        '-Wwrite-strings',
    6463        '-Wunknown-pragmas',
     
    9291extra_cflags = extra_common_flags + [
    9392        '-Wmissing-prototypes',
     93        '-Werror-implicit-function-declaration',
    9494
    9595        '-Wno-missing-braces',
  • meson/part/extra_targets/meson.build

    rb2cbc0b rf4a42661  
    3434                '--',
    3535                meson.build_root(),
    36                 config_py.path(),
     36                config_py.full_path(),
    3737                meson.source_root() / 'HelenOS.config',
    3838                meson.source_root() / 'defaults',
     
    5151                        '--',
    5252                        meson.build_root(),
    53                         config_py.path(),
     53                        config_py.full_path(),
    5454                        meson.source_root() / 'HelenOS.config',
    5555                        meson.source_root() / 'defaults',
     
    7777                '--',
    7878                meson.source_root() / 'doxygen',
    79                 doxygen.path(),
     79                doxygen.full_path(),
    8080                _dox_cfg,
    8181        ])
  • uspace/app/wifi_supplicant/wifi_supplicant.c

    rb2cbc0b rf4a42661  
    7575}
    7676
    77 static char *nic_addr_format(nic_address_t *addr)
    78 {
    79         char *str;
    80         int rc = asprintf(&str, "%02x:%02x:%02x:%02x:%02x:%02x",
     77static void nic_addr_format(nic_address_t *addr, char *out, size_t out_size)
     78{
     79        snprintf(out, out_size, "%02x:%02x:%02x:%02x:%02x:%02x",
    8180            addr->address[0], addr->address[1], addr->address[2],
    8281            addr->address[3], addr->address[4], addr->address[5]);
    83 
    84         if (rc < 0)
    85                 return NULL;
    86 
    87         return str;
    8882}
    8983
     
    263257        for (uint8_t i = 0; i < scan_results.length; i++) {
    264258                ieee80211_scan_result_t result = scan_results.results[i];
     259                char mac_addr_hex[18];
     260                nic_addr_format(&result.bssid, mac_addr_hex, 18);
    265261
    266262                printf("%16.16s %17s %4d %5s %5s %7s %7s\n",
    267                     result.ssid, nic_addr_format(&result.bssid),
     263                    result.ssid, mac_addr_hex,
    268264                    result.channel,
    269265                    enum_name(ieee80211_security_type_strs, result.security.type),
  • uspace/drv/nic/ar9271/wmi.c

    rb2cbc0b rf4a42661  
    230230        size_t buffer_size = header_size + command_length;
    231231        void *buffer = malloc(buffer_size);
     232        if (buffer == NULL) {
     233                usb_log_error("Failed to allocate WMI message buffer (out of memory).\n");
     234                return ENOMEM;
     235        }
    232236
    233237        if (command_buffer != NULL)
     
    241245            host2uint16_t_be(++htc_device->sequence_number);
    242246
    243         /* Send message. */
     247        /* Send message (buffer will not be needed afterwards regardless of result). */
    244248        errno_t rc = htc_send_control_message(htc_device, buffer, buffer_size,
    245249            htc_device->endpoints.wmi_endpoint);
    246         if (rc != EOK) {
    247                 free(buffer);
     250        free(buffer);
     251        if (rc != EOK) {
    248252                usb_log_error("Failed to send WMI message. Error: %s\n", str_error_name(rc));
    249253                return rc;
    250254        }
    251 
    252         free(buffer);
    253255
    254256        bool clean_resp_buffer = false;
     
    267269                    response_buffer_size, NULL);
    268270                if (rc != EOK) {
    269                         free(buffer);
    270271                        usb_log_error("Failed to receive WMI message response. "
    271272                            "Error: %s\n", str_error_name(rc));
     
    275276                if (response_buffer_size < sizeof(htc_frame_header_t) +
    276277                    sizeof(wmi_command_header_t)) {
    277                         free(buffer);
    278278                        usb_log_error("Corrupted response received.\n");
    279279                        return EINVAL;
  • uspace/lib/cpp/include/__bits/adt/hash_table.hpp

    rb2cbc0b rf4a42661  
    252252            void swap(hash_table& other)
    253253                noexcept(allocator_traits<allocator_type>::is_always_equal::value &&
    254                          noexcept(swap(declval<Hasher&>(), declval<Hasher&>())) &&
    255                          noexcept(swap(declval<KeyEq&>(), declval<KeyEq&>())))
     254                         noexcept(std::swap(declval<Hasher&>(), declval<Hasher&>())) &&
     255                         noexcept(std::swap(declval<KeyEq&>(), declval<KeyEq&>())))
    256256            {
    257257                std::swap(table_, other.table_);
  • uspace/lib/cpp/include/__bits/adt/rbtree.hpp

    rb2cbc0b rf4a42661  
    233233            void swap(rbtree& other)
    234234                noexcept(allocator_traits<allocator_type>::is_always_equal::value &&
    235                          noexcept(swap(declval<KeyComp&>(), declval<KeyComp&>())))
     235                         noexcept(std::swap(declval<KeyComp&>(), declval<KeyComp&>())))
    236236            {
    237237                std::swap(root_, other.root_);
  • uspace/lib/cpp/include/__bits/string/string.hpp

    rb2cbc0b rf4a42661  
    521521
    522522            basic_string(size_type n, value_type c, const allocator_type& alloc = allocator_type{})
    523                 : data_{}, size_{n}, capacity_{n}, allocator_{alloc}
     523                : data_{}, size_{n}, capacity_{n + 1}, allocator_{alloc}
    524524            {
    525525                data_ = allocator_.allocate(capacity_);
     
    908908            {
    909909                // TODO: if (n > max_size()) throw length_error.
    910                 resize_without_copy_(n);
     910                resize_without_copy_(n + 1);
    911911                traits_type::copy(begin(), str, n);
    912912                size_ = n;
  • uspace/lib/cpp/src/__bits/unwind.cpp

    rb2cbc0b rf4a42661  
    3030#include <cstdint>
    3131#include <cstdlib>
     32#include <typeinfo>
    3233
    3334namespace __cxxabiv1
  • uspace/lib/cpp/src/future.cpp

    rb2cbc0b rf4a42661  
    8484    const char* future_error::what() const noexcept
    8585    {
    86         return code().message().c_str();
     86        /*
     87         * FIXME
     88         * Following code would be optimal but the message string is
     89         * actually destroyed before the function returns so we would
     90         * be returning a dangling pointer. No simple fix available, hence
     91         * we use the ugly hack.
     92         */
     93        //return code().message().c_str();
     94#define QUOTE_ARG(arg) #arg
     95        return "future_error, see " __FILE__ ":" QUOTE_ARG(__LINE__);
    8796    }
    8897}
  • uspace/lib/ui/test/window.c

    rb2cbc0b rf4a42661  
    787787        PCUT_ASSERT_NOT_NULL(window);
    788788
    789         kbd_event.type = POS_PRESS;
     789        kbd_event.type = KEY_PRESS;
    790790        kbd_event.key = KC_X;
    791791        kbd_event.mods = 0;
  • uspace/lib/usbdev/include/usb/dev/device.h

    rb2cbc0b rf4a42661  
    9191
    9292usb_address_t usb_device_get_address(const usb_device_t *);
    93 usb_speed_t usb_device_get_depth(const usb_device_t *);
     93unsigned usb_device_get_depth(const usb_device_t *);
    9494usb_speed_t usb_device_get_speed(const usb_device_t *);
    9595int usb_device_get_iface_number(const usb_device_t *);
  • uspace/srv/hid/output/proto/vt100.c

    rb2cbc0b rf4a42661  
    4141#include "vt100.h"
    4242
    43 #define MAX_CONTROL  20
     43/** Buffer size when creating actual VT100 commands.
     44 *
     45 * This is absurdly large but since we accept numbers via sysarg_t,
     46 * we make it big enough for the largest value to be on the safe side
     47 * (and to silence compiler too).
     48 *
     49 * TODO: find out if VT100 has some hard limits or perhaps simply cut-out
     50 * values larger than 16 bits or something.
     51 */
     52#define MAX_CONTROL 64
    4453
    4554typedef enum {
Note: See TracChangeset for help on using the changeset viewer.