Event JSON
{
"id": "3cb7d33248522fe468764752fa3262a1ab166a4a49b8947bc03cf892bac0462f",
"pubkey": "4ebc018b65a1b352f90f937be79b5c338651f1528960889fa64caa94be982f8a",
"created_at": 1699311660,
"kind": 1,
"tags": [
[
"p",
"12d5e28f2e41328dfcbf497d7d94328748603bca9bc44f231610289a8539c987",
"wss://relay.mostr.pub"
],
[
"p",
"65cddc1bbe6b215bd1b395b27b62dadf1fb8bdc380caf9d3d877fdeb74654ba5",
"wss://relay.mostr.pub"
],
[
"p",
"721eacb3df4ee6374240e2978da81baa1daa75cf6908e4b988ea4130112f53b6",
"wss://relay.mostr.pub"
],
[
"e",
"bbb1a2b054141312ad488dc98efbae2730c92940ef377b58e38362d60582497b",
"wss://relay.mostr.pub",
"reply"
],
[
"t",
"include"
],
[
"content-warning",
"some c code"
],
[
"proxy",
"https://social.vlhl.dev/objects/221c9311-7850-4738-ba1f-da32fb3d0cb3",
"activitypub"
]
],
"content": "nostr:npub1zt279rewgyegml9lf97hm9pjsayxqw72n0zy7gckzq5f4pfeexrsx2ccgj nostr:npub1vhxacxa7dvs4h5dnjke8kck6mu0m30wrsr90n57cwl77kar9fwjs4lsekz nostr:npub1wg02ev7lfmnrwsjqu2tcm2qm4gw65aw0dyywfwvgafqnqyf02wmqhht0yf you don’t need to cast any pointer to/from void pointers actually.\n\nthis is valid and generates no warnings with -Wall -Wpedantic -fanalyzer:\n\n#include \u003cstdio.h\u003e\n#include \u003cstdlib.h\u003e\n\nstruct nya {\n\tint foo;\n\tint bar;\n};\n\nvoid nya(void *mew) {\n\tstruct nya *meow = mew;\n\tprintf(\"%d, %d\\n\", meow-\u003efoo, meow-\u003ebar);\n}\n\nint main() {\n\tstruct nya foo = { .foo = 5, .bar = 10 };\n\tnya(\u0026foo);\n\treturn 0;\n}\n\n\nso not only malloc, realloc, and free, void* in general are exempt from casts\n\n(but do remember strict aliasing rules. you can’t put a type into a void pointer, and then turn it into another type)",
"sig": "51634f571db576d86c9b768f4fbe9fd9b22764b0bcf088e331acf74f6164dbc9cbc033cdcf12757125284d0639c6b9838d367548f318a43f576d34fbc2f17633"
}