Skip to content

Commit

Permalink
clang-format: Gate out 18.1.6 changes
Browse files Browse the repository at this point in the history
So `make format` in Fedora doesn't disagree with CI...

Signed-off-by: Hector Martin <[email protected]>
  • Loading branch information
marcan committed May 16, 2024
1 parent 4f8ddca commit 1841d88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/usb_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,12 @@ struct usb_device_qualifier_descriptor {
* to UTF16 and because we need to calculate the correct total size of the
* string descriptor.
*/
// 18.1.6 vs 18.1.1 diff
// clang-format off
#define make_usb_string_descriptor(str) \
{.bLength = sizeof(struct usb_string_descriptor) + sizeof(u##str) - 2, \
.bDescriptorType = USB_STRING_DESCRIPTOR, \
.bString = u##str}
// clang-format on

#endif
3 changes: 3 additions & 0 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,10 @@ typedef struct {
int count;
} spinlock_t ALIGNED(SPINLOCK_ALIGN);

// 18.1.6 vs 18.1.1 diff
// clang-format off
#define SPINLOCK_INIT {-1, 0}
// clang-format on
#define DECLARE_SPINLOCK(n) spinlock_t n = SPINLOCK_INIT;

void spin_init(spinlock_t *lock);
Expand Down

0 comments on commit 1841d88

Please sign in to comment.