)]}'
{"src/helper/binarybuffer.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2dd535f85eee534c285f4162d00784d1f4f7d8c8","unresolved":true,"context_lines":[{"line_number":38,"context_line":"\tuint8_t *buffer \u003d _buffer;"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"\tif ((num \u003d\u003d 32) \u0026\u0026 (first \u003d\u003d 0)) {"},{"line_number":41,"context_line":"\t\tbuffer[3] \u003d (uint8_t)((value \u003e\u003e 24) \u0026 0xff);"},{"line_number":42,"context_line":"\t\tbuffer[2] \u003d (uint8_t)((value \u003e\u003e 16) \u0026 0xff);"},{"line_number":43,"context_line":"\t\tbuffer[1] \u003d (uint8_t)((value \u003e\u003e 8) \u0026 0xff);"},{"line_number":44,"context_line":"\t\tbuffer[0] \u003d (uint8_t)((value \u003e\u003e 0) \u0026 0xff);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"3840cdc5_8caf4875","line":41,"updated":"2025-02-09 22:45:55.000000000","message":"`man gcc` reports:\n```\n-Wconversion\n           Warn for implicit conversions that may alter a value. ...\n```\nHere the part `\u0026 0xff` has been added to guarantee that the result fits in `uint8_t` without the need for a a cast.\nThe compiler is wrong if it triggers a warning in this case because the value is not altered by the implicit conversion.\nWhich compiler and which compiler version has this bug?\n\nIn general I don\u0027t like adding a cast because it forces the compiler to accept the conversion and this can hide errors in the code. Sometimes we cannot avoid it, but here I feel we don\u0027t need it.","commit_id":"78cdb83fa2141c342dc880db92a99050f4b8fd13"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2dd535f85eee534c285f4162d00784d1f4f7d8c8","unresolved":true,"context_lines":[{"line_number":44,"context_line":"\t\tbuffer[0] \u003d (uint8_t)((value \u003e\u003e 0) \u0026 0xff);"},{"line_number":45,"context_line":"\t} else {"},{"line_number":46,"context_line":"\t\tfor (unsigned int i \u003d first; i \u003c first + num; i++) {"},{"line_number":47,"context_line":"\t\t\tconst uint8_t mask \u003d 1 \u003c\u003c (i % 8);"},{"line_number":48,"context_line":"\t\t\tif (((value \u003e\u003e (i - first)) \u0026 1) \u003d\u003d 1)"},{"line_number":49,"context_line":"\t\t\t\tbuffer[i / 8] |\u003d mask;"},{"line_number":50,"context_line":"\t\t\telse"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"38dae66c_821a51f6","line":47,"updated":"2025-02-09 22:45:55.000000000","message":"We never mentioned it in the coding style, but the attribute `const` for a local variable or for a temporarily value is in general not needed.\nIt is instead welcome for `struct` and for pointer passed to functions, when it indicates that the function will not change the input values.","commit_id":"78cdb83fa2141c342dc880db92a99050f4b8fd13"}]}
