/src/hdf5/src/H5Ounknown.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
2 | | * Copyright by The HDF Group. * |
3 | | * All rights reserved. * |
4 | | * * |
5 | | * This file is part of HDF5. The full HDF5 copyright notice, including * |
6 | | * terms governing use, modification, and redistribution, is contained in * |
7 | | * the LICENSE file, which can be found at the root of the source code * |
8 | | * distribution tree, or in https://www.hdfgroup.org/licenses. * |
9 | | * If you do not have access to either file, you may request a copy from * |
10 | | * help@hdfgroup.org. * |
11 | | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
12 | | |
13 | | /*------------------------------------------------------------------------- |
14 | | * |
15 | | * Created: H5Ounknown.c |
16 | | * |
17 | | * Purpose: Handle unknown message classes in a minimal way. |
18 | | * |
19 | | *------------------------------------------------------------------------- |
20 | | */ |
21 | | |
22 | | #include "H5Omodule.h" /* This source code file is part of the H5O module */ |
23 | | |
24 | | #include "H5private.h" /* Generic Functions */ |
25 | | #include "H5Eprivate.h" /* Error handling */ |
26 | | #include "H5FLprivate.h" /* Free lists */ |
27 | | #include "H5Opkg.h" /* Object headers */ |
28 | | |
29 | | /* PRIVATE PROTOTYPES */ |
30 | | static herr_t H5O__unknown_free(void *_mesg); |
31 | | |
32 | | /* This message derives from H5O message class */ |
33 | | const H5O_msg_class_t H5O_MSG_UNKNOWN[1] = {{ |
34 | | H5O_UNKNOWN_ID, /*message id number */ |
35 | | "unknown", /*message name for debugging */ |
36 | | 0, /*native message size */ |
37 | | 0, /* messages are shareable? */ |
38 | | NULL, /*decode message */ |
39 | | NULL, /*encode message */ |
40 | | NULL, /*copy the native value */ |
41 | | NULL, /*size of symbol table entry */ |
42 | | NULL, /*default reset method */ |
43 | | H5O__unknown_free, /* free method */ |
44 | | NULL, /* file delete method */ |
45 | | NULL, /* link method */ |
46 | | NULL, /*set share method */ |
47 | | NULL, /*can share method */ |
48 | | NULL, /* pre copy native value to file */ |
49 | | NULL, /* copy native value to file */ |
50 | | NULL, /* post copy native value to file */ |
51 | | NULL, /* get creation index */ |
52 | | NULL, /* set creation index */ |
53 | | NULL /*debug the message */ |
54 | | }}; |
55 | | |
56 | | /* Declare a free list to manage the H5O_unknown_t struct */ |
57 | | H5FL_DEFINE(H5O_unknown_t); |
58 | | |
59 | | /*------------------------------------------------------------------------- |
60 | | * Function: H5O__unknown_free |
61 | | * |
62 | | * Purpose: Frees the message |
63 | | * |
64 | | * Return: SUCCEED/FAIL |
65 | | * |
66 | | *------------------------------------------------------------------------- |
67 | | */ |
68 | | static herr_t |
69 | | H5O__unknown_free(void *mesg) |
70 | 0 | { |
71 | 0 | FUNC_ENTER_PACKAGE_NOERR |
72 | |
|
73 | 0 | assert(mesg); |
74 | |
|
75 | 0 | mesg = H5FL_FREE(H5O_unknown_t, mesg); |
76 | |
|
77 | 0 | FUNC_LEAVE_NOAPI(SUCCEED) |
78 | 0 | } /* end H5O__unknown_free() */ |